-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Status code is 0 when high-severity errors found. #30
Comments
You're right that SwiftLint should exit with a non-zero code when it finds violations, but only when errors are found, not warnings. I'd appreciate a PR doing this, if you're interested. |
I'll have a look. |
You could keep track of the number of violations above |
Done. It passes the SwiftLintFramework unit tests and lints against one of my projects successfully. If you want any more testing, or want me to make further changes please give me a shout. |
In the example file ok.swift, containing:
The bash command:
Returns
The return status of a shell script which generates error messages should not be 0. Xcode gives the following message at the end of the build process:
Currently the swiftlint command-line application only returns a non-zero exit code when swiftlint itself had errors, not when it discovers style violations in the source files it looks at. Please can you change it so that it returns a non-zero exit status when it finds style violations?
The text was updated successfully, but these errors were encountered: