-
Notifications
You must be signed in to change notification settings - Fork 1
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
Commits on Feb 15, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 5508fd1 - Browse repository at this point
Copy the full SHA 5508fd1View commit details
Commits on Feb 16, 2019
-
Merge pull request rubocop#6126 from rrosenblum/strict_mutable_constants
Add a Strict mode to Style/MutableConstants
Configuration menu - View commit details
-
Copy full SHA for ec5673b - Browse repository at this point
Copy the full SHA ec5673bView commit details -
Add expect_no_corrections helper
Maxim Krizhanovski committedFeb 16, 2019 Configuration menu - View commit details
-
Copy full SHA for 937d098 - Browse repository at this point
Copy the full SHA 937d098View commit details -
Convert more examples to expect_correction
Maxim Krizhanovski committedFeb 16, 2019 Configuration menu - View commit details
-
Copy full SHA for 6834afe - Browse repository at this point
Copy the full SHA 6834afeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 32d7bf7 - Browse repository at this point
Copy the full SHA 32d7bf7View commit details -
Configuration menu - View commit details
-
Copy full SHA for bc0b8b4 - Browse repository at this point
Copy the full SHA bc0b8b4View commit details -
Merge pull request rubocop#6613 from dduugg/unsafe-module-function
Mark Style/ModuleFunction as unsafe autocorrect
Configuration menu - View commit details
-
Copy full SHA for ee14e9b - Browse repository at this point
Copy the full SHA ee14e9bView commit details
Commits on Feb 17, 2019
-
[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.
Configuration menu - View commit details
-
Copy full SHA for 06fd3db - Browse repository at this point
Copy the full SHA 06fd3dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9d94d10 - Browse repository at this point
Copy the full SHA 9d94d10View commit details -
Fix node destructuring for
DefinedNode
extensionTo 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 ```
Configuration menu - View commit details
-
Copy full SHA for d9c607f - Browse repository at this point
Copy the full SHA d9c607fView commit details -
Merge pull request rubocop#6752 from rubocop-hq/expect-no-corrections…
…-helper Add expect_no_corrections helper
Configuration menu - View commit details
-
Copy full SHA for 3ec2faa - Browse repository at this point
Copy the full SHA 3ec2faaView commit details -
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 ``` ```
Configuration menu - View commit details
-
Copy full SHA for 4f1449b - Browse repository at this point
Copy the full SHA 4f1449bView commit details -
Merge pull request rubocop#6765 from gsamokovarov/omit-parentheses-kw…
…args Allow parens for optional keyword value calls in Style/MethodCallWithArgsParentheses
Configuration menu - View commit details
-
Copy full SHA for 508b051 - Browse repository at this point
Copy the full SHA 508b051View commit details -
Merge pull request rubocop#6756 from Drenmi/bugfix/retry-node
[Fix rubocop#6751] Prevent Style/OneLineConditional from breaking on retry and break keywords
Configuration menu - View commit details
-
Copy full SHA for 333d650 - Browse repository at this point
Copy the full SHA 333d650View commit details -
Add
range_type?
which meansirange_type?
anderange_type?
Follow up of rubocop#6126 (comment). This PR adds `range_type?` method which means both `irange_type?` method and `erange_type?` method.
Configuration menu - View commit details
-
Copy full SHA for 4105b22 - Browse repository at this point
Copy the full SHA 4105b22View commit details
Commits on Feb 18, 2019
-
Merge pull request rubocop#6773 from koic/add_range_type_predicate_me…
…thod Add `range_type?` which means `irange_type?` and `erange_type?`
Configuration menu - View commit details
-
Copy full SHA for b10af4f - Browse repository at this point
Copy the full SHA b10af4fView commit details -
Configuration menu - View commit details
-
Copy full SHA for ff34759 - Browse repository at this point
Copy the full SHA ff34759View commit details -
Merge pull request rubocop#6775 from pocke/fix-changelog-stype
Fix invalid links in CHANGELOG
Configuration menu - View commit details
-
Copy full SHA for 1f51e4c - Browse repository at this point
Copy the full SHA 1f51e4cView commit details
Commits on Feb 19, 2019
-
[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.
Configuration menu - View commit details
-
Copy full SHA for e81e7a2 - Browse repository at this point
Copy the full SHA e81e7a2View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 8fe4946 - Browse repository at this point
Copy the full SHA 8fe4946View commit details -
Configuration menu - View commit details
-
Copy full SHA for a1796a1 - Browse repository at this point
Copy the full SHA a1796a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e52af0 - Browse repository at this point
Copy the full SHA 2e52af0View commit details
Commits on Feb 20, 2019
-
* "financially supporting" makes more grammatical sense. * either "use a conservative version lock" or "use conservative version locking" makes sense, the previous version didn't.
Configuration menu - View commit details
-
Copy full SHA for 4876607 - Browse repository at this point
Copy the full SHA 4876607View commit details
Commits on Feb 21, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 7a1baae - Browse repository at this point
Copy the full SHA 7a1baaeView commit details -
The `end` for `let(:config)` was way too far down in the code. No examples in this `context` has ever run.
Configuration menu - View commit details
-
Copy full SHA for 95bb95a - Browse repository at this point
Copy the full SHA 95bb95aView commit details -
Inline shared_context that is used only once
Also remove unused `let(:raw_configuration)`.
Configuration menu - View commit details
-
Copy full SHA for ac62e04 - Browse repository at this point
Copy the full SHA ac62e04View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b7befa - Browse repository at this point
Copy the full SHA 3b7befaView commit details -
Configuration menu - View commit details
-
Copy full SHA for b448e0f - Browse repository at this point
Copy the full SHA b448e0fView commit details -
Only define same
let
once per contextThe `: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.
Configuration menu - View commit details
-
Copy full SHA for c22d5f2 - Browse repository at this point
Copy the full SHA c22d5f2View commit details -
Prefer
it_behaves_like
overinclude_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
Configuration menu - View commit details
-
Copy full SHA for 396648b - Browse repository at this point
Copy the full SHA 396648bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 21e7ff4 - Browse repository at this point
Copy the full SHA 21e7ff4View commit details
Commits on Feb 22, 2019
-
Merge pull request rubocop#6786 from bquorning/improve-specs-thanks-t…
…o-rspectre Improve specs thanks to rspectre
Configuration menu - View commit details
-
Copy full SHA for 94ef6c1 - Browse repository at this point
Copy the full SHA 94ef6c1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9962e3b - Browse repository at this point
Copy the full SHA 9962e3bView commit details -
Merge pull request rubocop#6788 from vlad-ro/patch-1
Add link to Formatters page
Configuration menu - View commit details
-
Copy full SHA for 96e9123 - Browse repository at this point
Copy the full SHA 96e9123View commit details -
[Fix rubocop#6688] Add
iterator?
to deprecated methods and prefer `……block_given?`
Configuration menu - View commit details
-
Copy full SHA for 5c957cd - Browse repository at this point
Copy the full SHA 5c957cdView commit details
Commits on Feb 25, 2019
-
Merge pull request rubocop#6714 from tejasbubane/new-cop-kernal-itera…
…tor-predicate Add `iterator?` to deprecated methods and prefer `block_given?`
Configuration menu - View commit details
-
Copy full SHA for 9ae94da - Browse repository at this point
Copy the full SHA 9ae94daView commit details -
Align an example for
RSpec/ExpectOffense
copFollow up of rubocop#6752. This PR aligns an example for `RSpec/ExpectOffense` cop.
Configuration menu - View commit details
-
Copy full SHA for 694d645 - Browse repository at this point
Copy the full SHA 694d645View commit details
Commits on Feb 26, 2019
-
[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.
Configuration menu - View commit details
-
Copy full SHA for f5b6244 - Browse repository at this point
Copy the full SHA f5b6244View commit details -
Merge pull request rubocop#6792 from koic/fix_infinite_loop_indentati…
…on_width [Fix rubocop#6699] Fix a false negative for `Layout/IndentationWidth`
Configuration menu - View commit details
-
Copy full SHA for 3d9131d - Browse repository at this point
Copy the full SHA 3d9131dView commit details
Commits on Feb 27, 2019
-
Merge pull request rubocop#6790 from koic/align_an_example_for_rspec_…
…expect_offense Align an example for `RSpec/ExpectOffense` cop
Configuration menu - View commit details
-
Copy full SHA for 256a992 - Browse repository at this point
Copy the full SHA 256a992View commit details
Commits on Feb 28, 2019
-
[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.
Configuration menu - View commit details
-
Copy full SHA for c30ecf0 - Browse repository at this point
Copy the full SHA c30ecf0View commit details
Commits on Mar 1, 2019
-
Merge pull request rubocop#6795 from koic/fix_false_positive_for_triv…
…ial_accessors [Fix rubocop#6777] Fix a false positive for `Style/TrivialAccessors`
Configuration menu - View commit details
-
Copy full SHA for abee2ca - Browse repository at this point
Copy the full SHA abee2caView commit details -
Fix errors for
Style/ConditionalAssignment
, `Style/IdenticalConditi……onalBranches`, `Lint/ElseLayout`, and `Layout/IndentationWidth` with empty braces
Configuration menu - View commit details
-
Copy full SHA for 9d6f4f6 - Browse repository at this point
Copy the full SHA 9d6f4f6View commit details
Commits on Mar 2, 2019
-
Merge pull request rubocop#6799 from pocke/()
Fix errors for `Style/ConditionalAssignment`, `Style/IdenticalConditionalBranches`, `Lint/ElseLayout`, and `Layout/IndentationWidth` with empty braces
Configuration menu - View commit details
-
Copy full SHA for d3a894a - Browse repository at this point
Copy the full SHA d3a894aView commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 68156ce - Browse repository at this point
Copy the full SHA 68156ceView commit details -
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
Configuration menu - View commit details
-
Copy full SHA for ae6a799 - Browse repository at this point
Copy the full SHA ae6a799View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9612547 - Browse repository at this point
Copy the full SHA 9612547View commit details -
Merge pull request rubocop#6797 from pocke/fix-for-Layout/SpaceAround…
…BlockParameters Fix false negative for Layout/SpaceAroundBlockParameters
Configuration menu - View commit details
-
Copy full SHA for fa6f71c - Browse repository at this point
Copy the full SHA fa6f71cView commit details -
Fix error for
Style/NumericLiterals
on a literal that contains spacesProblem === 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.
Configuration menu - View commit details
-
Copy full SHA for d21f6d7 - Browse repository at this point
Copy the full SHA d21f6d7View commit details -
Merge pull request rubocop#6803 from pocke/numeric-literal-sapce
Fix error for `Style/NumericLiterals` on a literal that contains spaces
Configuration menu - View commit details
-
Copy full SHA for 47a97b7 - Browse repository at this point
Copy the full SHA 47a97b7View commit details
Commits on Mar 3, 2019
-
Configuration menu - View commit details
-
Copy full SHA for a75bda2 - Browse repository at this point
Copy the full SHA a75bda2View commit details -
Merge pull request rubocop#6801 from pocke/Style/Lambda
Fix auto-correction for `Style/Lambda` with no-space argument
Configuration menu - View commit details
-
Copy full SHA for dc69686 - Browse repository at this point
Copy the full SHA dc69686View commit details
Commits on Mar 4, 2019
-
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
Configuration menu - View commit details
-
Copy full SHA for 2183874 - Browse repository at this point
Copy the full SHA 2183874View commit details -
Merge pull request rubocop#6804 from pocke/Style/NumericLiterals-expo…
…nent Fix auto-correction of `Style/NumericLiterals` on numeric literal with exponent
Configuration menu - View commit details
-
Copy full SHA for 344861d - Browse repository at this point
Copy the full SHA 344861dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 806c9f6 - Browse repository at this point
Copy the full SHA 806c9f6View commit details
Commits on Mar 5, 2019
-
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.
Configuration menu - View commit details
-
Copy full SHA for ac4c7bc - Browse repository at this point
Copy the full SHA ac4c7bcView commit details
Commits on Mar 6, 2019
-
Merge pull request rubocop#6810 from koic/exclude_gemspec_by_default_…
…for_metrics_block_length Exclude gemspec file by default for `Metrics/BlockLength`
Configuration menu - View commit details
-
Copy full SHA for 4654809 - Browse repository at this point
Copy the full SHA 4654809View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e83ddd - Browse repository at this point
Copy the full SHA 9e83dddView commit details -
Merge pull request rubocop#6815 from znz/fix-block_given-arity
Remove argument of `iterator?` and `block_given?`
Configuration menu - View commit details
-
Copy full SHA for 50df7bb - Browse repository at this point
Copy the full SHA 50df7bbView commit details -
Configuration menu - View commit details
-
Copy full SHA for fe6da44 - Browse repository at this point
Copy the full SHA fe6da44View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d58f96 - Browse repository at this point
Copy the full SHA 1d58f96View commit details