Skip to content

Commit 6471b7f

Browse files
committed
update comment
1 parent 1a4f7e9 commit 6471b7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

commands/scan/scan.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ func (scanCmd *ScanCommand) RunAndRecordResults(cmdType utils.CommandType, recor
269269
if err = cmdResults.GetErrors(); err != nil {
270270
return
271271
}
272-
// If violation context was proivded it means that context was provided, so we need to check for build violations.
273-
// If user provided --fail=false, don't fail the build.
272+
// We consider failing the build only when --fail=true. If user provided --fail=false, don't fail the build even when fail-build rules are applied.
273+
// If violation context was provided, we need to all existing violations for fail-build rules.
274274
if scanCmd.fail && scanCmd.resultsContext.HasViolationContext() {
275275
if results.CheckIfFailBuild(cmdResults.GetScaScansXrayResults()) {
276276
return results.NewFailBuildError()

0 commit comments

Comments
 (0)