SwiftLint
SwiftLint copied to clipboard
OnlyRule not work with custom_rules
New Issue Checklist
- [x] I've Updated SwiftLint to the latest version.
- [x] I've searched for existing GitHub issues.
Bug Description
If you specify a custom rule in the --only-rule argument, then no violations are detected during linting. (It does scan the files though)
When linting a built-in rule, everything works correctly
$ swiftlint lint --no-cache --only-rule my_rule
Environment
- SwiftLint version 0.58.2
- Xcode version 16.2
- Installation method used mise-en-place
Historically, handling of custom rules has its peculiarities and we have one of these examples here. Unexpectedly, the command to run a single custom rule is like swiftlint lint --only-rule custom_rules --only-rule my_rule.