0

It seems like, instead of the SUPER helpful Offense/Concern/Warning sytax like:

C: Use delete instead of gsub.

It could display:

C: Use delete instead of gsub. Cop name: [Whatever it's upset about]

So you could disable the thing without another hour of googling the ungooglable.

I've googled this for a while now and have yet to find the answer in the 4,200 questions this excellent linter has generated.

Ben Wiseley
  • 537
  • 6
  • 14

2 Answers2

2

To display the cop name in the output, you can use --display-cop-names, or -D for short.

Example:

$ bundle exec rubocop -D tmp.rb
Inspecting 1 file
C

Offenses:

tmp.rb:1:6: C: Style/MethodCallParentheses: Do not use parentheses for method calls with no arguments.
hello()
     ^
Drenmi
  • 8,492
  • 4
  • 42
  • 51
-1
be rubocop --dedbug

That sort of does it... you can toss a file name in there as well

be rubocop app/models/ihaterubocop.rb --dedbug
Ben Wiseley
  • 537
  • 6
  • 14
  • that would be debug not dedbug. Is your question how to fix the offense or how to turn off the warning? – nikkypx Jul 11 '16 at 23:54