Reputation: 81671
What's the difference between the severities "error" and "fatal" in RuboCop?
The documentation about severity says
Each cop has a default severity level based on which department it belongs to. The level is warning for Lint and convention for all the others. Cops can customize their severity level. Allowed params are refactor, convention, warning, error and fatal.
There is one exception from the general rule above and that is Lint/Syntax, a special cop that checks for syntax errors before the other cops are invoked. It can not be disabled and its severity (fatal) can not be changed in configuration.
Which suggests fatal is more severe than error, but I can write code that is not valid ruby and it only generates an "error" level offense.
def foo
42
# No end
$ rubocop -D invalid.rb
Inspecting 1 file
E
Offenses:
invalid.rb:3:11: E: unexpected token $end
# No end
1 file inspected, 1 offense detected
Upvotes: 0
Views: 707
Reputation: 8355
The rubocop source suggests that encoding problems are the only ones that can lead to a fatal outcome. If you search for "fatal" on the rubocop github, you see very few mentions, and if you track where it is called, that's basically it.
Upvotes: 1