Commit a391bf4
fix(cli): exit non-zero when wheels validate finds errors (#2907)
* fix(cli): exit non-zero when wheels validate finds errors
wheels validate printed its report and returned "" on every path, so the
process exited 0 even when validation found errors and CI could not gate
on it (framework review H5, same family as #2890 / CLI audit H6).
- errors found: record the failure inside the try, throw
Wheels.ValidationFailed after the report is flushed (runTests pattern,
out of reach of the catch-all)
- analyzer crash: the catch now prints then rethrows instead of
swallowing, matching migrate()
- no app/ directory: throw Wheels.InvalidArguments after the red hint,
matching the other user-error paths
- warnings-only stays exit 0: results.valid is true when no
severity=="error" issues exist, so validate remains usable as a soft
linter; output text and ordering are unchanged
Adds ValidateCommandSpec covering all four paths. Verified locally on the
Lucee 7 docker harness: 4/4 new specs pass, InfoCommandSpec's existing
validate case stays green.
Intentional behavior change: scripts that relied on exit 0 despite
reported errors will now fail; the MCP wheels_validate tool surfaces a
proper tool error instead of a silent empty result. Out of scope: U1
(wheels upgrade check exit code) and the runTests mid-run HTTP
catch-swallow.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Peter Amiri <peter@alurium.com>
* fix(cli): address Reviewer A/B consensus findings (round 1)
- Replace stale "Both commands always exit 0" claim in
web/sites/guides/.../code-quality.mdx with accurate split:
validate exits non-zero on errors, analyze always exits 0.
- Condense the two multi-line comment blocks in Module.cfc::validate()
(3-line and 5-line) to single-line per CLAUDE.md "one short line max"
convention — invariants preserved, just shorter prose.
- Condense the 11-line component docstring and 4-line $makeProject()
docstring in ValidateCommandSpec.cfc to single-line comments for the
same reason.
All changes are pure comment/text edits; no runtime behaviour change.
Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
* fix(cli): address Reviewer A consensus findings (round 2)
- cli/lucli/tests/specs/commands/ValidateCommandSpec.cfc lines 7-8:
condense 2-line comment block to single-line per CLAUDE.md
("Never write multi-paragraph docstrings or multi-line comment
blocks — one short line max").
- cli/lucli/tests/specs/commands/ValidateCommandSpec.cfc lines 17-19:
condense 3-line comment block to single-line, same rule.
Comment-only changes; no runtime behaviour impact. Test bodies and
the four-case coverage matrix are untouched.
Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
---------
Signed-off-by: Peter Amiri <peter@alurium.com>
Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>1 parent a2c4a9f commit a391bf4
3 files changed
Lines changed: 92 additions & 2 deletions
File tree
- cli/lucli
- tests/specs/commands
- web/sites/guides/src/content/docs/v4-0-0/command-line-tools/wheels-commands
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1728 | 1728 | | |
1729 | 1729 | | |
1730 | 1730 | | |
1731 | | - | |
| 1731 | + | |
| 1732 | + | |
1732 | 1733 | | |
1733 | 1734 | | |
1734 | 1735 | | |
1735 | 1736 | | |
1736 | 1737 | | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
1737 | 1741 | | |
1738 | 1742 | | |
1739 | 1743 | | |
| |||
1749 | 1753 | | |
1750 | 1754 | | |
1751 | 1755 | | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
1752 | 1760 | | |
1753 | 1761 | | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
1754 | 1769 | | |
1755 | 1770 | | |
1756 | 1771 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
0 commit comments