How do I get a rubocop to show the severity of the warning or worse?
I found that rubocop breaks rules into different categories : , and others : Syntax
Lint
If you don't have custom severity levels in your configuration, it's pretty straightforward. Sinax Cop reports fatal and erroneous level, Lint policies at warning level and all other cops at agreement level.
So, for fatal and error only, this
rubocop --only Syntax
(which is only maintained by the master, not yet released) for both warning and aboverubocop --only Lint
.
Therefore, these are the errors Lint
that I need to fix first.
In my case, the best way to handle this is to work from top to bottom through rubocop_todo.yml
, which can be created with
rubocop --auto-gen-config
Since the file rubocop_todo.yml
is created in order of severity, i.e. Syntax
at the top and then Lint
and then others, working through them in order, first captures the warnings.
source to share