Skip to content

refactor(linter): centralize Off severity handling in RegisterRule#2

Merged
nozaq merged 1 commit into
mainfrom
refactor-off
Jul 12, 2026
Merged

refactor(linter): centralize Off severity handling in RegisterRule#2
nozaq merged 1 commit into
mainfrom
refactor-off

Conversation

@nozaq

@nozaq nozaq commented Jul 12, 2026

Copy link
Copy Markdown
Member

linter.Linter.RegisterRule already handled Off (skip pattern compilation) but rules.RegisterRules duplicated the check by never calling it for Off-severity rules, leaving RegisterRule's own Off path dead in practice. Route all rules through RegisterRule unconditionally so it's the single, self-defending owner of the Off behavior.

linter.Linter.RegisterRule already handled Off (skip pattern
compilation) but rules.RegisterRules duplicated the check by never
calling it for Off-severity rules, leaving RegisterRule's own Off path
dead in practice. Route all rules through RegisterRule unconditionally
so it's the single, self-defending owner of the Off behavior.
@nozaq nozaq merged commit ddf5d69 into main Jul 12, 2026
8 checks passed
@nozaq nozaq deleted the refactor-off branch July 12, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant