You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add --exit-on-failure (-E) flag for CI integration
Adds a new flag that causes xcsift to exit with a non-zero exit code
when the build status is not "success". This is useful for CI pipelines
that need to fail the job when the build fails.
* Test & documentation for exit-on-failure flag
- Add unit tests for exitOnFailure logic
- Add configuration decoding test to verify exit_on_failure parses correctly
- Add documentation for exit-on-failure flag
|`build_info`| bool |`false`| Include per-target build phases and timing |
114
117
|`executable`| bool |`false`| Include executable targets |
115
118
119
+
### Exit Behavior
120
+
121
+
| Option | Type | Default | Description |
122
+
|--------|------|---------|-------------|
123
+
|`exit_on_failure`| bool |`false`| Exit with failure code if build does not succeed |
124
+
116
125
### TOON Configuration
117
126
118
127
Options in the `[toon]` section:
@@ -211,12 +220,15 @@ For CI, you might want different settings:
211
220
# .xcsift.toml for CI
212
221
format = "json"
213
222
warnings = true
214
-
werror = true# Fail on warnings
223
+
werror = true# Fail on warnings
224
+
exit_on_failure = true# Return non-zero exit code on failure
215
225
coverage = true
216
226
coverage_details = true
217
227
build_info = true
218
228
```
219
229
230
+
**Tip:** Combining `werror = true` and `exit_on_failure = true` ensures your CI pipeline fails on any errors, warnings, or test failures. This is useful for enforcing code quality standards.
-`1` — Build failed (errors, linker errors, or test failures)
278
-
-`1` — Build has warnings (when `--Werror` is used)
303
+
-`0` — Build succeeded (or xcsift completed normally without `--exit-on-failure`)
304
+
-`1` — Build failed (errors, linker errors, or test failures) when `--exit-on-failure` is used
305
+
-`1` — Build has warnings when both `--Werror` and `--exit-on-failure` are used
306
+
307
+
**Note:** Without `--exit-on-failure`, xcsift always exits with `0` regardless of build status. The exit code reflects xcsift's own execution, not the build result. Use `--exit-on-failure` (`-E`) when you want xcsift's exit code to reflect the build status for CI integration.
0 commit comments