SwiftLint icon indicating copy to clipboard operation
SwiftLint copied to clipboard

Add a `validate` .swiftlint.yml command

Open timsearle opened this issue 6 months ago • 0 comments

New Issue Checklist

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.

timsearle avatar Jun 25 '25 11:06 timsearle