Skip to content

Commit

Permalink
fix lint issues
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Korczynski <[email protected]>
  • Loading branch information
AdamKorcz committed Dec 19, 2023
1 parent a9fbd3c commit 4bd1ec4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion probes/branchProtectionAppliesToAdmins/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func Run(raw *checker.RawResults) ([]finding.Finding, string, error) {

for i := range r.Branches {
branch := &r.Branches[i]
nilMsg := fmt.Sprintf("unable to retrieve whether or not branch protection settings apply to administrators on branch '%s'",
nilMsg := fmt.Sprintf("unable to retrieve whether branch protection settings apply to administrators on branch '%s'",
*branch.Name)
trueMsg := fmt.Sprintf("branch protection settings apply to administrators on branch '%s'", *branch.Name)
falseMsg := fmt.Sprintf("branch protection settings do not apply to administrators on branch '%s'", *branch.Name)
Expand Down
4 changes: 2 additions & 2 deletions probes/internal/utils/branchprotection/branchProtection.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func GetTextOutcomeFromBool(b *bool, nilMsg, trueMsg, falseMsg string) (string,
case !*b:
return falseMsg, finding.OutcomeNegative, nil
}
return "", finding.OutcomeError , errWrongValue
return "", finding.OutcomeError, errWrongValue

Check warning on line 34 in probes/internal/utils/branchprotection/branchProtection.go

View check run for this annotation

Codecov / codecov/patch

probes/internal/utils/branchprotection/branchProtection.go#L34

Added line #L34 was not covered by tests
}

func Uint32LargerThan0(u32 *int32, nilMsg, trueMsg, falseMsg string) (string, finding.Outcome, error) {
Expand All @@ -43,5 +43,5 @@ func Uint32LargerThan0(u32 *int32, nilMsg, trueMsg, falseMsg string) (string, fi
case *u32 == 0:
return falseMsg, finding.OutcomeNegative, nil
}
return "", finding.OutcomeError , errWrongValue
return "", finding.OutcomeError, errWrongValue

Check warning on line 46 in probes/internal/utils/branchprotection/branchProtection.go

View check run for this annotation

Codecov / codecov/patch

probes/internal/utils/branchprotection/branchProtection.go#L46

Added line #L46 was not covered by tests
}

0 comments on commit 4bd1ec4

Please sign in to comment.