Repository navigation
cli: Fail YAML validation for missing input - #796
Merged
Merged
Conversation
ascli_validate_files_format() returns a process status, but its YAML missing-file path returned FALSE and therefore reported success. Return ASCLI_EXIT_CODE_BAD_INPUT, matching text validation.
There was a problem hiding this comment.
🟢 Approval recommended
The focused fix aligns validation behavior and includes appropriate regression coverage, with no unresolved findings.
0 open findings
What changed in this PR
Corrects YAML validation’s exit status for missing input files, matching text validation behavior.
Changes:
- Returns
ASCLI_EXIT_CODE_BAD_INPUTinstead of success. - Adds regression coverage for missing files in text and YAML modes.
- Registers the CLI test with Meson.
| File | Description |
|---|---|
| tools/ascli-actions-validate.c | Corrects the missing-file exit code. |
| tests/test-cli.c | Tests missing-file exit status in both formats. |
| tests/meson.build | Builds and registers the CLI test. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Owner
|
Why the heck is Copilot here? I didn't enable that... Please drop the test, it's very verbose and doesn't actually give us much. Do keep the bugfix though, that one is valid! |
eugeniodepalo
force-pushed
the
fix/yaml-missing-input-status
branch
from
October 15, 2026 17:55
2779ace to
a598ef1
Compare
Contributor
Author
|
Thanks for the feedback @ximion - I've deleted the test. |
Owner
|
Thank you for the patch! :-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
YAML validation returned success for missing files because its integer status
function returned
FALSE.Return
ASCLI_EXIT_CODE_BAD_INPUT, matching text validation. Maintainer-mode build and tests pass.