Skip to content

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
@ahoppen ahoppen deleted the lint-warning-by-default branch September 1, 2025 17:57
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