You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cop enabling process can be altered by setting DisabledByDefault or EnabledByDefault (but not both) to true. These settings override the default for all cops to disabled or enabled, except Lint/Syntax which is always enabled, regardless of the cops' default values (whether enabled, disabled or pending).
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 cannot be disabled and its severity (fatal) cannot be changed in configuration.
If this is considered a bug then RedundantCopDisableDirective and RedundantCopEnableDirective should probably detect this as an offense. (actually, probably not? It's not valid syntax after all, don't think that would work)
Consider this very simple example file:
foo*
This isn't valid syntax and RuboCop complains. If I change this snippet to the following no offense is detected anymore:
My understanding is that
Lint/Syntax
should not be able to be disabled under any circumstance. https://docs.rubocop.org/rubocop/1.60/configuration.htmlIf this is considered a bug then
RedundantCopDisableDirective
andRedundantCopEnableDirective
should probably detect this as an offense. (actually, probably not? It's not valid syntax after all, don't think that would work)RuboCop version
The text was updated successfully, but these errors were encountered: