Use as part of the CI pipeline & fail on warnings

I'd like to replace SwiftLint with this tool instead in my projects, we are using SwiftLint as part of our CI pipeline though with the --strict to ensure there are no warnings (or errors) at all as SwiftLint will return with a non-0 exit code and therefore make our CI fail. In my tests, when I ran swift-format lint the exit status was always 0 even when dozens of warnings were reported.

So my first question is:
In which cases does the lint subcommand fail right now? It seems not to be clearly documented.

And my second question:
Can we add (or is there already) an option to fail on warnings, too?

1 Like