Return 1 only in case of error#1282
Merged
Merged
Conversation
Test Results1 176 tests 1 176 ✅ 1m 17s ⏱️ Results for commit f648c6c. ♻️ This comment has been updated with latest results. |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Compliance Engine assessor CLI to treat “non-compliant” results as a normal outcome (exit code 0) and reserve exit code 1 for actual execution/engine errors, while also improving log-handle lifetime management.
Changes:
- Change assessor exit code semantics to return
1only for errors (not for non-compliance). - Add
--continue-on-error(-e) to skip rules that fail due to engine errors and continue processing, tracking whether any error occurred. - Wrap the log handle in an RAII-managed
std::unique_ptrwith a custom deleter.
kkanas
previously approved these changes
Jun 3, 2026
danielszot
previously approved these changes
Jun 3, 2026
The base branch was changed.
13c9eb5 to
f648c6c
Compare
kkanas
approved these changes
Jun 3, 2026
kkanas
approved these changes
Jun 3, 2026
danielszot
approved these changes
Jun 3, 2026
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.
Description
Currently the compliance-engine-assessor returns an error in case of incompliance. I want the tool to return 1 only if there was an actual error and treat incompliance as regular state.
Use RAII to release the log handle automatically.
Checklist
devbranch prior to this PR submission.devbranch.