makandra / makandra-rubocop

makandra's default Rubocop configuration
MIT License
6 stars 1 forks source link

Adjust `config/default.yml` to rubocop version 1.25.0 #38

Closed denzelem closed 2 years ago

denzelem commented 2 years ago

@makmarius reported, that version 9.1.0 prints deprecation warnings e.g. "obsolete parameter IgnoredPatterns (for Lint/UnreachableLoop)".

It looks like 645273d538b686a9aaa28306b89ddd78fc42ba09 missed the guideline in https://github.com/makandra/makandra-rubocop#upgrading-rubocop-dependencies. Upgrading the version of the rubocop dependencies requires to adjust our default.yml with the changes in the upstream. Thanks!

ghost commented 2 years ago

Thank you for creating the issue!

Actually 9.1.0 is broken for me for multiple ruby versions since it doesn't only print warnings but an error as well:

Ruby 2.6

Warning: obsolete parameter `IgnoredPatterns` (for `Layout/IndentationWidth`) found in /home/marius/.rbenv/versions/2.6.10/lib/ruby/gems/2.6.0/gems/makandra-rubocop-9.1.0/config/default.yml
`IgnoredPatterns` has been renamed to `AllowedPatterns`.
obsolete parameter `IgnoredPatterns` (for `Layout/LineLength`) found in /home/marius/.rbenv/versions/2.6.10/lib/ruby/gems/2.6.0/gems/makandra-rubocop-9.1.0/config/default.yml
`IgnoredPatterns` has been renamed to `AllowedPatterns`.
obsolete parameter `IgnoredPatterns` (for `Lint/UnreachableLoop`) found in /home/marius/.rbenv/versions/2.6.10/lib/ruby/gems/2.6.0/gems/makandra-rubocop-9.1.0/config/default.yml
`IgnoredPatterns` has been renamed to `AllowedPatterns`.
obsolete parameter `IgnoredPatterns` (for `Naming/MethodName`) found in /home/marius/.rbenv/versions/2.6.10/lib/ruby/gems/2.6.0/gems/makandra-rubocop-9.1.0/config/default.yml
`IgnoredPatterns` has been renamed to `AllowedPatterns`.
obsolete parameter `IgnoredPatterns` (for `Style/MethodCallWithArgsParentheses`) found in /home/marius/.rbenv/versions/2.6.10/lib/ruby/gems/2.6.0/gems/makandra-rubocop-9.1.0/config/default.yml
`IgnoredPatterns` has been renamed to `AllowedPatterns`.
Error: unrecognized cop or department Lint/UselessElseWithoutRescue found in /home/marius/.rbenv/versions/2.6.10/lib/ruby/gems/2.6.0/gems/makandra-rubocop-9.1.0/config/default.yml
Did you mean `Lint/UselessSetterCall`?

Ruby 3.1

Warning: obsolete parameter `IgnoredPatterns` (for `Layout/IndentationWidth`) found in /home/marius/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/makandra-rubocop-9.1.0/config/default.yml
`IgnoredPatterns` has been renamed to `AllowedPatterns`.
obsolete parameter `IgnoredPatterns` (for `Layout/LineLength`) found in /home/marius/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/makandra-rubocop-9.1.0/config/default.yml
`IgnoredPatterns` has been renamed to `AllowedPatterns`.
obsolete parameter `IgnoredPatterns` (for `Lint/UnreachableLoop`) found in /home/marius/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/makandra-rubocop-9.1.0/config/default.yml
`IgnoredPatterns` has been renamed to `AllowedPatterns`.
obsolete parameter `IgnoredPatterns` (for `Naming/MethodName`) found in /home/marius/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/makandra-rubocop-9.1.0/config/default.yml
`IgnoredPatterns` has been renamed to `AllowedPatterns`.
obsolete parameter `IgnoredPatterns` (for `Style/MethodCallWithArgsParentheses`) found in /home/marius/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/makandra-rubocop-9.1.0/config/default.yml
`IgnoredPatterns` has been renamed to `AllowedPatterns`.
Error: unrecognized cop or department Lint/UselessElseWithoutRescue found in /home/marius/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/makandra-rubocop-9.1.0/config/default.yml
Did you mean `Lint/UselessSetterCall`?
ghost commented 2 years ago

I think this was an issue with conflicting installed rubocop versions. I installed rubocop standalone as well. As I seldomly use it inside of projects using bundle exec this might be the source of this confusion.

Once I removed all rubocop versions (gem uninstall rubocop) and makandra-rubocop (gem uninstall makandra-rubocop) and started fresh with gem install makandra-rubocop I did not see either errors nor warnings.

I think this issue can be closed because it is not a bug in this gem.

brunosedler commented 2 years ago

Closing this issue because of the requester's last comment