Skip to content

Comments

feat: add --only option for rule filtering#25

Merged
rockorager merged 1 commit intorockorager:mainfrom
simonklee:add-only
Feb 16, 2026
Merged

feat: add --only option for rule filtering#25
rockorager merged 1 commit intorockorager:mainfrom
simonklee:add-only

Conversation

@simonklee
Copy link
Contributor

@simonklee simonklee commented Feb 16, 2026

Currently it only supports subtractive filtering through --ignore. Single-rule runs require you to ignore every other rule or pipe it to grep.

Add repeatable --only . After loading .ziglint.zon, disable all rules, enable only selected rules, then apply --ignore so explicit ignores still take precedence.

Feel free to close if this goes in a different direction then where you want to go.

Currently it only supports subtractive filtering through --ignore.
Single-rule runs require you to ignore every other rule or pipe it
to grep.

Add repeatable --only <rule>. After loading .ziglint.zon, disable all rules,
enable only selected rules, then apply --ignore so explicit ignores still take
precedence.
@rockorager rockorager merged commit bfcb30d into rockorager:main Feb 16, 2026
5 checks passed
@rockorager
Copy link
Owner

Thanks!

@simonklee simonklee deleted the add-only branch February 16, 2026 22:53
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.

2 participants