Skip to content

Commit

Permalink
[Enhancement] creating a new error code for rule failures (aws-cloudf…
Browse files Browse the repository at this point in the history
…ormation#379)

* temp

* adding new exit code for when a rule fails

* added integration test to validate error code for a failing test

* cleanup

* rebase + fix test

* removed unecessary double 0
  • Loading branch information
joshfried-aws committed Jun 30, 2023
1 parent dfb7418 commit 4419128
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions guard/src/commands/validate/structured.rs
Expand Up @@ -75,6 +75,7 @@ impl<'eval> StructuredEvaluator<'eval> {
if let Status::FAIL = eval_rules_file(rule, &mut root_scope, Some(&each.name))? {
self.exit_code = 19;
}

let root_record = root_scope.reset_recorder().extract();
let report = simplifed_json_from_root(&root_record)?;
file_report.combine(report);
Expand Down

0 comments on commit 4419128

Please sign in to comment.