Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix rescue assignment check on begin block assigned #1

Closed
wants to merge 61 commits into from

Commits on Feb 15, 2019

  1. Configuration menu
    Copy the full SHA
    5508fd1 View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2019

  1. Merge pull request rubocop#6126 from rrosenblum/strict_mutable_constants

    Add a Strict mode to Style/MutableConstants
    koic committed Feb 16, 2019
    Configuration menu
    Copy the full SHA
    ec5673b View commit details
    Browse the repository at this point in the history
  2. Add expect_no_corrections helper

    Maxim Krizhanovski committed Feb 16, 2019
    Configuration menu
    Copy the full SHA
    937d098 View commit details
    Browse the repository at this point in the history
  3. Convert more examples to expect_correction

    Maxim Krizhanovski committed Feb 16, 2019
    Configuration menu
    Copy the full SHA
    6834afe View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    32d7bf7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bc0b8b4 View commit details
    Browse the repository at this point in the history
  6. Merge pull request rubocop#6613 from dduugg/unsafe-module-function

    Mark Style/ModuleFunction as unsafe autocorrect
    koic committed Feb 16, 2019
    Configuration menu
    Copy the full SHA
    ee14e9b View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2019

  1. [Fix rubocop#6751] Prevent Style/OneLineConditional from breaking on …

    …retry keyword
    
    This cop would break on code like:
    
    ```
    if true then retry else 7 end
    ```
    
    This was happening because the `retry` node was expected to be decorated
    with a decorator that includes the `MethodDispatchNode` extension.
    
    This change adds a `RetryNode` decorator.
    Drenmi committed Feb 17, 2019
    Configuration menu
    Copy the full SHA
    06fd3db View commit details
    Browse the repository at this point in the history
  2. Add new BreakNode extension

    Drenmi committed Feb 17, 2019
    Configuration menu
    Copy the full SHA
    9d94d10 View commit details
    Browse the repository at this point in the history
  3. Fix node destructuring for DefinedNode extension

    To make this polymorphic with other method dispatch nodes, we need
    to do some custom destructuring.
    
    Before:
    
    ```
    defined_node.node_parts
    ```
    
    After:
    
    ```
    defined_node.node_parts
    ```
    Drenmi committed Feb 17, 2019
    Configuration menu
    Copy the full SHA
    d9c607f View commit details
    Browse the repository at this point in the history
  4. Merge pull request rubocop#6752 from rubocop-hq/expect-no-corrections…

    …-helper
    
    Add expect_no_corrections helper
    Drenmi committed Feb 17, 2019
    Configuration menu
    Copy the full SHA
    3ec2faa View commit details
    Browse the repository at this point in the history
  5. Allow parens for optional keyword value calls

    Before:
    
    ```ruby
    def foo(bar: baz(42))
                    ^^^^ Omit parentheses for method calls with arguments.
    end
    ```
    
    After:
    
    ```ruby
    def foo(bar: baz(42))
    end
    ```
    ```
    gsamokovarov committed Feb 17, 2019
    Configuration menu
    Copy the full SHA
    4f1449b View commit details
    Browse the repository at this point in the history
  6. Merge pull request rubocop#6765 from gsamokovarov/omit-parentheses-kw…

    …args
    
    Allow parens for optional keyword value calls in Style/MethodCallWithArgsParentheses
    koic committed Feb 17, 2019
    Configuration menu
    Copy the full SHA
    508b051 View commit details
    Browse the repository at this point in the history
  7. Merge pull request rubocop#6756 from Drenmi/bugfix/retry-node

    [Fix rubocop#6751] Prevent Style/OneLineConditional from breaking on retry and break keywords
    koic committed Feb 17, 2019
    Configuration menu
    Copy the full SHA
    333d650 View commit details
    Browse the repository at this point in the history
  8. Add range_type? which means irange_type? and erange_type?

    Follow up of rubocop#6126 (comment).
    
    This PR adds `range_type?` method which means both
    `irange_type?` method and `erange_type?` method.
    koic committed Feb 17, 2019
    Configuration menu
    Copy the full SHA
    4105b22 View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2019

  1. Merge pull request rubocop#6773 from koic/add_range_type_predicate_me…

    …thod
    
    Add `range_type?` which means `irange_type?` and `erange_type?`
    koic committed Feb 18, 2019
    Configuration menu
    Copy the full SHA
    b10af4f View commit details
    Browse the repository at this point in the history
  2. Fix invalid links in CHANGELOG

    pocke committed Feb 18, 2019
    Configuration menu
    Copy the full SHA
    ff34759 View commit details
    Browse the repository at this point in the history
  3. Merge pull request rubocop#6775 from pocke/fix-changelog-stype

    Fix invalid links in CHANGELOG
    koic committed Feb 18, 2019
    Configuration menu
    Copy the full SHA
    1f51e4c View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2019

  1. [Fix rubocop#6755] Prevent Style/TrailingCommaInArgument from breakin…

    …g when a safe method call is chained on the offending method
    
    This cop would error out on code like:
    
    ```
    foo.bar(
      baz: 1,
    )&.fetch(:qux)
    ```
    
    This was happening because the cop wasn't taking `csend` (safe navigation)
    node types into consideration.
    Drenmi committed Feb 19, 2019
    Configuration menu
    Copy the full SHA
    e81e7a2 View commit details
    Browse the repository at this point in the history
  2. Merge pull request rubocop#6757 from Drenmi/bugfix/trailing-comma-in-…

    …arguments-cop
    
    [Fix rubocop#6755] Prevent Style/TrailingCommaInArgument from breaking when a safe method call is chained on the offending method
    Drenmi committed Feb 19, 2019
    Configuration menu
    Copy the full SHA
    8fe4946 View commit details
    Browse the repository at this point in the history
  3. Cut 0.65.0

    Drenmi committed Feb 19, 2019
    Configuration menu
    Copy the full SHA
    a1796a1 View commit details
    Browse the repository at this point in the history
  4. Merge pull request rubocop#6776 from Drenmi/release/0-65-0

    Cut 0.65.0
    Drenmi committed Feb 19, 2019
    Configuration menu
    Copy the full SHA
    2e52af0 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2019

  1. Language updates

    * "financially supporting" makes more grammatical sense.
    * either "use a conservative version lock" or "use conservative version locking" makes sense, the previous version didn't.
    sgerrand committed Feb 20, 2019
    Configuration menu
    Copy the full SHA
    4876607 View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2019

  1. Merge pull request rubocop#6782 from sgerrand/patch-1

    README tweaks
    Drenmi committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    7a1baae View commit details
    Browse the repository at this point in the history
  2. Fix syntax whoopsie

    The `end` for `let(:config)` was way too far down in the code. No examples in this `context` has ever run.
    bquorning committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    95bb95a View commit details
    Browse the repository at this point in the history
  3. Inline shared_context that is used only once

    Also remove unused `let(:raw_configuration)`.
    bquorning committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    ac62e04 View commit details
    Browse the repository at this point in the history
  4. Remove unused lets

    bquorning committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    3b7befa View commit details
    Browse the repository at this point in the history
  5. Test the right thing

    bquorning committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    b448e0f View commit details
    Browse the repository at this point in the history
  6. Only define same let once per context

    The `:cop_config` was defined twice in the same (outer) context. I find it
    easier to read when the `let`s are placed towards the top of its context block.
    bquorning committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    c22d5f2 View commit details
    Browse the repository at this point in the history
  7. Prefer it_behaves_like over include_examples

    The RSpec documentation says
    
        include_examples "name"    # include the examples in the current context
        it_behaves_like "name"     # include the examples in a nested context
    
    They also warn that
    
        When you include parameterized examples in the current context multiple
        times, you may override previous method definitions and last declaration
        wins.
    
    and also
    
        To prevent this kind of subtle error a warning is emitted if you declare
        multiple methods with the same name in the same context. Should you get
        this warning the simplest solution is to replace `include_examples` with
        `it_behaves_like`, in this way method overriding is avoided because of the
        nested context created by `it_behaves_like`.
    
    https://relishapp.com/rspec/rspec-core/docs/example-groups/shared-examples
    bquorning committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    396648b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    21e7ff4 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2019

  1. Merge pull request rubocop#6786 from bquorning/improve-specs-thanks-t…

    …o-rspectre
    
    Improve specs thanks to rspectre
    Drenmi committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    94ef6c1 View commit details
    Browse the repository at this point in the history
  2. Add link to Formatters page

    vlad-ro committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    9962e3b View commit details
    Browse the repository at this point in the history
  3. Merge pull request rubocop#6788 from vlad-ro/patch-1

    Add link to Formatters page
    koic committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    96e9123 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5c957cd View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2019

  1. Merge pull request rubocop#6714 from tejasbubane/new-cop-kernal-itera…

    …tor-predicate
    
     Add `iterator?` to deprecated methods and prefer `block_given?`
    Drenmi committed Feb 25, 2019
    Configuration menu
    Copy the full SHA
    9ae94da View commit details
    Browse the repository at this point in the history
  2. Align an example for RSpec/ExpectOffense cop

    Follow up of rubocop#6752.
    
    This PR aligns an example for `RSpec/ExpectOffense` cop.
    koic committed Feb 25, 2019
    Configuration menu
    Copy the full SHA
    694d645 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2019

  1. [Fix rubocop#6699] Fix a false negative for Layout/IndentationWidth

    Fixes rubocop#6699.
    
    This PR fixes infinite loop for `Layout/IndentationWidth` and
    `Layout/IndentationConsistency` when bad modifier indentation
    before good method definition.
    
    ```ruby
    # exmaple.rb
    class Foo
          private
    
      def foo
      end
    end
    ```
    
    First, auto-corrected by `Layout/IndentationConsistency`.
    
    ```console
    % rubocop -v
    0.65.0
    % rubocop -a --only Layout/IndentationConsistency example.rb
    Inspecting 1 file
    C
    
    Offenses:
    
    example.rb:4:3: C: [Corrected] Layout/IndentationConsistency: Inconsistent indentation detected.
      def foo ...
      ^^^^^^^
    
    1 file inspected, 1 offense detected, 1 offense corrected
    ```
    
    ```diff
    % g diff
    diff --git a/example.rb b/example.rb
    index 23d3556..974f101 100644
    --- a/example.rb
    +++ b/example.rb
    @@ -1,6 +1,6 @@
     class Foo
           private
    
    -  def foo
    -  end
    +      def foo
    +      end
     end
    ```
    
    Next, auto-corrected by `Layout/IndentationWidth`.
    
    ```console
    % rubocop -a --only Layout/IndentationWidth example.rb
    Inspecting 1 file
    C
    
    Offenses:
    
    example.rb:4:1: C: [Corrected] Layout/IndentationWidth: Use 2 (not 6)
    spaces for indentation.
          def foo
    ^^^^^^
    
    1 file inspected, 1 offense detected, 1 offense corrected
    ```
    
    This will return to the original code.
    
    ```diff
    % g diff
    diff --git a/example.rb b/example.rb
    index 974f101..23d3556 100644
    --- a/example.rb
    +++ b/example.rb
    @@ -1,6 +1,6 @@
     class Foo
           private
    
    -      def foo
    -      end
    +  def foo
    +  end
     end
    ```
    
    That caused the infinite loop in `Layout/IndentationConsistency`
    and `Layout/IndentationWidth`.
    
    With this PR, `Layout/indentationWidth` cop makes aware of
    the bad modifier indentation before good method definition.
    
    ```console
    % rubocop -a --only Layout/IndentationWidth example.rb
    Inspecting 1 file
    C
    
    Offenses:
    
    example.rb:2:1: C: [Corrected] Layout/IndentationWidth: Use 2 (not 6)
    spaces for indentation.
          private
    ^^^^^^
    
    1 file inspected, 1 offense detected, 1 offense corrected
    ```
    
    ```diff
    diff --git a/example.rb b/example.rb
    index 23d3556..07525ec 100644
    --- a/example.rb
    +++ b/example.rb
    @@ -1,5 +1,5 @@
     class Foo
    -      private
    +  private
    
       def foo
       end
    ```
    
    This PR fixes the above false negative. That would be an auto-correct expected.
    koic committed Feb 26, 2019
    Configuration menu
    Copy the full SHA
    f5b6244 View commit details
    Browse the repository at this point in the history
  2. Merge pull request rubocop#6792 from koic/fix_infinite_loop_indentati…

    …on_width
    
    [Fix rubocop#6699] Fix a false negative for `Layout/IndentationWidth`
    koic committed Feb 26, 2019
    Configuration menu
    Copy the full SHA
    3d9131d View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2019

  1. Merge pull request rubocop#6790 from koic/align_an_example_for_rspec_…

    …expect_offense
    
    Align an example for `RSpec/ExpectOffense` cop
    Drenmi committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    256a992 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2019

  1. [Fix rubocop#6777] Fix a false positive for Style/TrivialAccessors

    Fixes rubocop#6777.
    
    This PR fixes a false positive for `Style/TrivialAccessors` when
    using reader / writer at the top level.
    
    The following is a reproduction code.
    
    ```ruby
    # example.rb
    def foo
      @foo
    end
    ```
    
    ```console
    % rubocop example.rb --only Style/TrivialAccessors -a
    Inspecting 1 file
    C
    
    Offenses:
    
    example.rb:1:1: C: [Corrected] Style/TrivialAccessors: Use attr_reader
    to define trivial reader methods.
    def response
    ^^^
    
    1 file inspected, 1 offense detected, 1 offense corrected
    ```
    
    An error occurs in the auto-corrected code.
    
    ```diff
    % git diff
    diff --git a/example.rb b/example.rb
    index b26fec0..1868b1d 100644
    --- a/example.rb
    +++ b/example.rb
    @@ -1,5 +1,3 @@
    -def response
    -  @response
    -end
    +attr_reader :response
    ```
    
    ```console
    % ruby example.rb
    Traceback (most recent call last):
    example.rb:1:in `<main>': undefined method `attr_reader' for main:Object (NoMethodError)
    ```
    
    This also occurs with writer. This PR will allow these cases.
    koic committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    c30ecf0 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2019

  1. Merge pull request rubocop#6795 from koic/fix_false_positive_for_triv…

    …ial_accessors
    
    [Fix rubocop#6777] Fix a false positive for `Style/TrivialAccessors`
    koic committed Mar 1, 2019
    Configuration menu
    Copy the full SHA
    abee2ca View commit details
    Browse the repository at this point in the history
  2. Fix errors for Style/ConditionalAssignment, `Style/IdenticalConditi…

    …onalBranches`, `Lint/ElseLayout`, and `Layout/IndentationWidth` with empty braces
    pocke committed Mar 1, 2019
    Configuration menu
    Copy the full SHA
    9d6f4f6 View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2019

  1. Merge pull request rubocop#6799 from pocke/()

    Fix errors for `Style/ConditionalAssignment`, `Style/IdenticalConditionalBranches`, `Lint/ElseLayout`, and `Layout/IndentationWidth` with empty braces
    pocke committed Mar 2, 2019
    Configuration menu
    Copy the full SHA
    d3a894a View commit details
    Browse the repository at this point in the history
  2. Fix auto-correction for Style/SymbolArray with array contains interpo…

    …lation
    
    Problem
    ===
    
    `Style/SymbolArray` cop's auto-correction breaks on an array that contains an interpolation when `EnforcedStyle` is `bracktes`
    
    Example
    
    ```ruby
     # test.rb
    %I[#{foo}]
    ```
    
    ```yaml
     # .rubocop.yml
    Style/SymbolArray:
      EnforcedStyle: brackets
    ```
    
    ```bash
    $ rubocop --debug -a --only Style/SymbolArray
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/parser-2.6.0.0/lib/parser/lexer.rb:10836: warning: assigned but unused variable - testEof
    An error occurred while Style/SymbolArray cop was inspecting /tmp/tmp.1xg8JstsGV/test.rb:2:0.
    
    1 error occurred:
    An error occurred while Style/SymbolArray cop was inspecting /tmp/tmp.1xg8JstsGV/test.rb:2:0.
    Errors are usually caused by RuboCop bugs.
    Please, report your problems to RuboCop's issue tracker.
    https://github.com/rubocop-hq/rubocop/issues
    
    Mention the following information in the issue report:
    0.65.0 (using Parser 2.6.0.0, running on ruby 2.7.0 x86_64-linux)
    For /tmp/tmp.1xg8JstsGV: configuration from /tmp/tmp.1xg8JstsGV/.rubocop.yml
    Default configuration from /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/config/default.yml
    Inspecting 1 file
    Scanning /tmp/tmp.1xg8JstsGV/test.rb
    undefined method `value' for s(:dsym,
      s(:begin,
        s(:send, nil, :foo))):RuboCop::AST::Node
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/style/symbol_array.rb:73:in `block in correct_bracketed'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/style/symbol_array.rb:73:in `map'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/style/symbol_array.rb:73:in `correct_bracketed'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/style/symbol_array.rb:59:in `autocorrect'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/cop.rb:153:in `correct'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/cop.rb:131:in `add_offense'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/mixin/percent_array.rb:41:in `check_percent_array'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/style/symbol_array.rb:49:in `on_array'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/commissioner.rb:58:in `block (2 levels) in trigger_responding_cops'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/commissioner.rb:106:in `with_cop_error_handling'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/commissioner.rb:57:in `block in trigger_responding_cops'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/commissioner.rb:56:in `each'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/commissioner.rb:56:in `trigger_responding_cops'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/commissioner.rb:34:in `block (2 levels) in <class:Commissioner>'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/ast/traversal.rb:13:in `walk'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/commissioner.rb:46:in `investigate'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/team.rb:116:in `investigate'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/team.rb:96:in `offenses'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/team.rb:44:in `inspect_file'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:280:in `inspect_file'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:227:in `block in do_inspection_loop'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:259:in `block in iterate_until_no_changes'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:252:in `loop'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:252:in `iterate_until_no_changes'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:223:in `do_inspection_loop'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:126:in `block in file_offenses'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:144:in `file_offense_cache'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:124:in `file_offenses'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:112:in `process_file'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:89:in `block in each_inspected_file'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:86:in `each'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:86:in `reduce'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:86:in `each_inspected_file'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:76:in `inspect_files'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:48:in `run'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cli.rb:174:in `execute_runner'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cli.rb:75:in `execute_runners'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cli.rb:47:in `run'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/exe/rubocop:13:in `block in <top (required)>'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/2.7.0/benchmark.rb:308:in `realtime'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/exe/rubocop:12:in `<top (required)>'
    /home/pocke/.rbenv/versions/trunk/bin/rubocop:23:in `load'
    /home/pocke/.rbenv/versions/trunk/bin/rubocop:23:in `<main>'
    .
    
    1 file inspected, no offenses detected
    Finished in 0.17103776399744675 seconds
    ```
    
    This pull request will fix this problem.
    
    Note
    ===
    
    `Style/WordArray` treats interpolation already, so it's no problem.
    https://github.com/rubocop-hq/rubocop/blob/d3a894a7fc9848d12ef06634f231dae73a4016f6/lib/rubocop/cop/style/word_array.rb#L86
    pocke committed Mar 2, 2019
    Configuration menu
    Copy the full SHA
    68156ce View commit details
    Browse the repository at this point in the history
  3. Merge pull request rubocop#6802 from pocke/fix-SymbolArray-auto-corre…

    …ct-with-string-interpolation
    
    Fix auto-correction for Style/SymbolArray with array contains interpolation
    koic committed Mar 2, 2019
    Configuration menu
    Copy the full SHA
    ae6a799 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9612547 View commit details
    Browse the repository at this point in the history
  5. Merge pull request rubocop#6797 from pocke/fix-for-Layout/SpaceAround…

    …BlockParameters
    
    Fix false negative for Layout/SpaceAroundBlockParameters
    pocke committed Mar 2, 2019
    Configuration menu
    Copy the full SHA
    fa6f71c View commit details
    Browse the repository at this point in the history
  6. Fix error for Style/NumericLiterals on a literal that contains spaces

    Problem
    ===
    
    Style/NumericLiterals breaks on a literal that contains spaces.
    Example:
    
    ```ruby
    a = - 12345
    ```
    
    ```bash
    $ rubocop -a --only NumericLiterals
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/parser-2.6.0.0/lib/parser/lexer.rb:10836: warning: assigned but unused variable - testEof
    invalid value for Integer(): "- 12345"
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/style/numeric_literals.rb:79:in `Integer'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/style/numeric_literals.rb:79:in `format_number'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/style/numeric_literals.rb:46:in `block in autocorrect'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/corrector.rb:64:in `block (2 levels) in rewrite'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/parser-2.6.0.0/lib/parser/source/tree_rewriter.rb:220:in `transaction'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/corrector.rb:63:in `block in rewrite'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/corrector.rb:61:in `each'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/corrector.rb:61:in `rewrite'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/team.rb:128:in `autocorrect_all_cops'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/team.rb:72:in `autocorrect'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/team.rb:100:in `block in offenses'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/team.rb:117:in `investigate'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/team.rb:96:in `offenses'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/team.rb:44:in `inspect_file'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:280:in `inspect_file'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:227:in `block in do_inspection_loop'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:259:in `block in iterate_until_no_changes'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:252:in `loop'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:252:in `iterate_until_no_changes'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:223:in `do_inspection_loop'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:126:in `block in file_offenses'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:144:in `file_offense_cache'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:124:in `file_offenses'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:112:in `process_file'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:89:in `block in each_inspected_file'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:86:in `each'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:86:in `reduce'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:86:in `each_inspected_file'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:76:in `inspect_files'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:48:in `run'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cli.rb:174:in `execute_runner'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cli.rb:75:in `execute_runners'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cli.rb:47:in `run'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/exe/rubocop:13:in `block in <top (required)>'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/2.7.0/benchmark.rb:308:in `realtime'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/exe/rubocop:12:in `<top (required)>'
    /home/pocke/.rbenv/versions/trunk/bin/rubocop:23:in `load'
    /home/pocke/.rbenv/versions/trunk/bin/rubocop:23:in `<main>'
    Inspecting 1 file
    
    0 files inspected, no offenses detected
    ```
    
    This patch fixes the problem.
    pocke committed Mar 2, 2019
    Configuration menu
    Copy the full SHA
    d21f6d7 View commit details
    Browse the repository at this point in the history
  7. Merge pull request rubocop#6803 from pocke/numeric-literal-sapce

    Fix error for `Style/NumericLiterals` on a literal that contains spaces
    koic committed Mar 2, 2019
    Configuration menu
    Copy the full SHA
    47a97b7 View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2019

  1. Configuration menu
    Copy the full SHA
    a75bda2 View commit details
    Browse the repository at this point in the history
  2. Merge pull request rubocop#6801 from pocke/Style/Lambda

    Fix auto-correction for `Style/Lambda` with no-space argument
    pocke committed Mar 3, 2019
    Configuration menu
    Copy the full SHA
    dc69686 View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2019

  1. Fix auto-correction of Style/NumericLiterals on numeric literal wit…

    …h exponent
    
    Problem
    ===
    
    Style/NumericLiterals cop's auto-correction raises an error on numeric literal with exponent.
    It passes "12345e6" to `Integer()` method. It is not valid as an integer, so it raises an error.
    
    Example:
    
    ```ruby
    12345e6
    ```
    
    ```bash
    $ rubocop -a --only NumericLiterals
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/parser-2.6.0.0/lib/parser/lexer.rb:10836: warning: assigned but unused variable - testEof
    invalid value for Integer(): "12345e6"
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/style/numeric_literals.rb:79:in `Integer'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/style/numeric_literals.rb:79:in `format_number'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/style/numeric_literals.rb:46:in `block in autocorrect'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/corrector.rb:64:in `block (2 levels) in rewrite'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/parser-2.6.0.0/lib/parser/source/tree_rewriter.rb:220:in `transaction'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/corrector.rb:63:in `block in rewrite'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/corrector.rb:61:in `each'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/corrector.rb:61:in `rewrite'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/team.rb:128:in `autocorrect_all_cops'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/team.rb:72:in `autocorrect'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/team.rb:100:in `block in offenses'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/team.rb:117:in `investigate'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/team.rb:96:in `offenses'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cop/team.rb:44:in `inspect_file'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:280:in `inspect_file'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:227:in `block in do_inspection_loop'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:259:in `block in iterate_until_no_changes'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:252:in `loop'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:252:in `iterate_until_no_changes'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:223:in `do_inspection_loop'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:126:in `block in file_offenses'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:144:in `file_offense_cache'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:124:in `file_offenses'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:112:in `process_file'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:89:in `block in each_inspected_file'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:86:in `each'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:86:in `reduce'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:86:in `each_inspected_file'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:76:in `inspect_files'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/runner.rb:48:in `run'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cli.rb:174:in `execute_runner'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cli.rb:75:in `execute_runners'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/lib/rubocop/cli.rb:47:in `run'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/exe/rubocop:13:in `block in <top (required)>'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/2.7.0/benchmark.rb:308:in `realtime'
    /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/rubocop-0.65.0/exe/rubocop:12:in `<top (required)>'
    /home/pocke/.rbenv/versions/trunk/bin/rubocop:23:in `load'
    /home/pocke/.rbenv/versions/trunk/bin/rubocop:23:in `<main>'
    Inspecting 1 file
    
    0 files inspected, no offenses detected
    ```
    
    Add test case for Style/NumericLiterals with large E
    pocke committed Mar 4, 2019
    Configuration menu
    Copy the full SHA
    2183874 View commit details
    Browse the repository at this point in the history
  2. Merge pull request rubocop#6804 from pocke/Style/NumericLiterals-expo…

    …nent
    
    Fix auto-correction of `Style/NumericLiterals` on numeric literal with exponent
    koic committed Mar 4, 2019
    Configuration menu
    Copy the full SHA
    344861d View commit details
    Browse the repository at this point in the history
  3. Remove powerpack dependency

    dduugg authored and bbatsov committed Mar 4, 2019
    Configuration menu
    Copy the full SHA
    806c9f6 View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2019

  1. Exclude gemspec file by default for Metrics/BlockLength

    This PR excludes gemspec file by default for `Metrics/BlockLength` cop.
    
    When gemspec file is changed, it is mainly the increase / decrease for
    `add_runtime_dependency` and `add_development_dependency`.
    There is no tendency to change with complicated logic.
    
    Also gemspec file made with `bundle gem` is also warned by default.
    
    ```console
    % bundle -v
    Bundler version 2.0.1
    % bundle gem foo
    Creating gem 'foo'...
    MIT License enabled in config
          create  foo/Gemfile
          create  foo/lib/foo.rb
          create  foo/lib/foo/version.rb
          create  foo/foo.gemspec
          create  foo/Rakefile
          create  foo/README.md
          create  foo/bin/console
          create  foo/bin/setup
          create  foo/.gitignore
          create  foo/.travis.yml
          create  foo/.rspec
          create  foo/spec/spec_helper.rb
          create  foo/spec/foo_spec.rb
          create  foo/LICENSE.txt
    Initializing git repo in /private/tmp/foo
    
    % rubocop -v
    0.65.0
    % rubocop --only Metrics/BlockLength
    Inspecting 8 files
    C.......
    
    Offenses:
    
    foo.gemspec:6:1: C: Metrics/BlockLength: Block has too many
    lines. [26/25]
    Gem::Specification.new do |spec| ...
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    8 files inspected, 1 offense detected
    ```
    
    Therefore this PR excluded gemspec file by default.
    koic committed Mar 5, 2019
    Configuration menu
    Copy the full SHA
    ac4c7bc View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2019

  1. Merge pull request rubocop#6810 from koic/exclude_gemspec_by_default_…

    …for_metrics_block_length
    
    Exclude gemspec file by default for `Metrics/BlockLength`
    Drenmi committed Mar 6, 2019
    Configuration menu
    Copy the full SHA
    4654809 View commit details
    Browse the repository at this point in the history
  2. Remove argument of iterator? and block_given?

    Because those arity is 0.
    znz committed Mar 6, 2019
    Configuration menu
    Copy the full SHA
    9e83ddd View commit details
    Browse the repository at this point in the history
  3. Merge pull request rubocop#6815 from znz/fix-block_given-arity

    Remove argument of `iterator?` and `block_given?`
    koic committed Mar 6, 2019
    Configuration menu
    Copy the full SHA
    50df7bb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fe6da44 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1d58f96 View commit details
    Browse the repository at this point in the history