reviewdog / action-rubocop

Run rubocop with reviewdog ๐Ÿถ
MIT License
115 stars 75 forks source link

The suggedtion for `Rails/RedundantActiveRecordAllMethod` is incorrect #96

Open massongit opened 8 months ago

massongit commented 8 months ago

When running reviewdog/action-rubocop action, the suggestion for Rails/RedundantActiveRecordAllMethod that appears in the pull request review is incorrect.


Expected behavior

๐Ÿ“ [rubocop] <Rails/RedundantActiveRecordAllMethod> reported by reviewdog :dog:
Redundant all detected.

    User.find_by(1)

Actual behavior

https://github.com/massongit/action-rubocop/pull/2#discussion_r1493670936

๐Ÿ“ [rubocop] <Rails/RedundantActiveRecordAllMethod> reported by reviewdog :dog:
Redundant all detected.

   User..find_by(1)

Steps to reproduce the problem

Example: https://github.com/massongit/action-rubocop/pull/2

I run reviewdog/action-rubocop action with the following conditions:

RuboCop version

https://github.com/massongit/action-rubocop/actions/runs/7947724505/job/21696894186?pr=2

  Successfully installed rubocop-ast-1.30.0
  Successfully installed rexml-3.2.6
  Successfully installed regexp_parser-2.9.0
  Successfully installed rainbow-3.1.1
  Successfully installed parallel-1.24.0
  Successfully installed language_server-protocol-3.17.0.3
  Successfully installed rubocop-1.60.2
  11 gems installed
  Successfully installed rack-3.0.9
  Successfully installed ruby2_keywords-0.0.5
  Successfully installed drb-2.2.0
  Successfully installed base64-0.2.0
  Successfully installed connection_pool-2.4.1
  Successfully installed concurrent-ruby-1.2.3
  Successfully installed tzinfo-2.0.6
  Successfully installed i18n-1.14.1
  Successfully installed activesupport-7.1.3
  Successfully installed rubocop-rails-2.23.1
  10 gems installed
  Successfully installed rubocop-performance-1.20.2
  1 gem installed
  Successfully installed rubocop-factory_bot-2.25.1
  Successfully installed rubocop-capybara-2.20.0
  Successfully installed rubocop-rspec-2.26.1
  3 gems installed
  Successfully installed rubocop-i18n-3.0.0
  1 gem installed
  Successfully installed rubocop-rake-0.6.0