mirror of
https://github.com/ossf/scorecard.git
synced 2024-09-19 13:07:17 +03:00
Fix lint issues: nestif linter
This commit is contained in:
parent
4c6b500dea
commit
5151e8c301
@ -87,14 +87,13 @@ func IsBranchProtected(protection *github.Protection, c *checker.CheckRequest) c
|
||||
}
|
||||
|
||||
if protection.GetRequiredStatusChecks() != nil {
|
||||
if !protection.RequiredStatusChecks.Strict {
|
||||
switch {
|
||||
case !protection.RequiredStatusChecks.Strict:
|
||||
c.Logf("!! branch protection require status checks to pass before merging not enabled")
|
||||
} else {
|
||||
if len(protection.RequiredStatusChecks.Contexts) == 0 {
|
||||
c.Logf("!! branch protection require status checks to pass before merging has no specific status to check for")
|
||||
} else {
|
||||
totalSuccess++
|
||||
}
|
||||
case len(protection.RequiredStatusChecks.Contexts) == 0:
|
||||
c.Logf("!! branch protection require status checks to pass before merging has no specific status to check for")
|
||||
default:
|
||||
totalSuccess++
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user