Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: cli flag to enable specific rules, overriding all other configuration #13

Closed
NoahTheDuke opened this issue May 2, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@NoahTheDuke
Copy link
Owner

Problem statement

Looking for specific issues in a codebase can be time-consuming. Splint allows for enabling and disabling rules, but modifying .splint.edn to focus on a specific rule is inconvenient and error-prone. It would be a boon to allow for specifying rules at the command line while disabling all others.

Potential solution

Something like --only style/apply-str or --rule style/apply-str. Can take multiple entries. After the config is processed, update all rules to be disabled, then enable provided rules.

Prior art

RuboCop has --only which takes one or more cops separated by commas: rubocop --only Rails/Blank,Layout/HeredocIndentation,Naming/FileName.

clj-kondo allows for passing a config map: clj-kondo --lint corpus --config '^:replace {:linters {:redundant-let {:level :info}}}' I hate writing maps in the cli, so I don't wanna do that one. I also don't want to mess around with metadata, everything should be explicit imo.

@NoahTheDuke NoahTheDuke added the enhancement New feature or request label May 7, 2024
@NoahTheDuke
Copy link
Owner Author

Implemented in 9ca4cfa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant