Running a specific Cop in Rubocop


You are working on an existing rails project with many rubocop warnings and you would like to fix certain types or warnings by getting only the specified files.


So for example when you use rubocop you first get the following for all the files in the project:

You can get a grouping of the errors by using the following:

If you would like to know only the files for a certain type of warning to be able to fix them you could try the following: