SwiftLint
SwiftLint copied to clipboard
Add a `validate` .swiftlint.yml command
New Issue Checklist
- [X] I've Updated SwiftLint to the latest version.
- [X] I've searched for existing GitHub issues.
Feature or Enhancement Proposal
I cannot determine a way to validate if the .swiftlint.yml file is correct. The existing commands do output an error if the parsing fails, but then they fallback to the default configuration.
It would be great to have a command that only parses the yaml file for correctness to help protect this flow from breaking but technically still running the lint checks.
Renovate, for example, has renovate-config-validator, which allows you to fail a pull request if the config change being made breaks anything.
Alternative option:
Provide a flag that means it will not revert to defaults in the event of a parsing error and exit the CLI with a non-zero exit code.