File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed
Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -1116,19 +1116,17 @@ func doIntegrity(cliCtx *cli.Context) error {
11161116
11171117 skipChecks := cliCtx .String ("skip-check" )
11181118 if len (skipChecks ) > 0 {
1119- var finalChecks [] integrity.Check
1119+ skipSet := map [ integrity.Check ] struct {}{}
11201120 for skipCheck := range strings .SplitSeq (skipChecks , "," ) {
1121- found := false
1122- for _ , chk := range requestedChecks {
1123- if chk == integrity .Check (skipCheck ) {
1124- found = true
1125- logger .Info ("[integrity] skipping check" , "check" , chk )
1126- break
1127- }
1128- }
1129- if ! found {
1130- finalChecks = append (finalChecks , integrity .Check (skipCheck ))
1121+ skipSet [integrity .Check (skipCheck )] = struct {}{}
1122+ }
1123+ var finalChecks []integrity.Check
1124+ for _ , chk := range requestedChecks {
1125+ if _ , skip := skipSet [chk ]; skip {
1126+ logger .Info ("[integrity] skipping check" , "check" , chk )
1127+ continue
11311128 }
1129+ finalChecks = append (finalChecks , chk )
11321130 }
11331131
11341132 requestedChecks = finalChecks
You can’t perform that action at this time.
0 commit comments