Skip to content

Make linter emit warnings instead of errors by default #999

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

Merged
merged 1 commit into from
Apr 18, 2025

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Apr 18, 2025

When running swift-format lint in an Xcode run script phase and it exits with a non-zero exit code, the build will fail. This started happening since we treated all linter findings as errors in #943.

To fix this:

  • Diagnose all findings as warnings again and exit with code 0 even if there are findings
  • Resurrect --strict to treat all findings as errors and exit with 1 if there were any findings.

rdar://148389716

When running `swift-format lint` in an Xcode run script phase and it exits with a non-zero exit code, the build will fail. This started happening since we treated all linter findings as errors in swiftlang#943.

To fix this:
- Diagnose all findings as warnings again and exit with code 0 even if there are findings
- Resurrect `--strict` to treat all findings as errors and exit with 1 if there were any findings.

rdar://148389716
@ahoppen ahoppen merged commit 8b55263 into swiftlang:main Apr 18, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants