Skip to content

Commit

Permalink
Log at debug level
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Korczynski <[email protected]>
  • Loading branch information
AdamKorcz committed Dec 11, 2023
1 parent a7970c6 commit 0f6383f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 1 addition & 4 deletions checks/evaluation/ci_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func CITests(name string,
// Debug PRs that were merged without CI tests
for i := range findings {
f := &findings[i]
if f.Outcome == finding.OutcomeNegative {
if f.Outcome == finding.OutcomeNegative || f.Outcome == finding.OutcomePositive {
dl.Debug(&checker.LogMessage{
Text: f.Message,
})
Expand All @@ -59,9 +59,6 @@ func CITests(name string,
return checker.CreateRuntimeErrorResult(name, e)
}

// Log all findings
checker.LogFindings(nonNegativeFindings(findings), dl)

reason := fmt.Sprintf("%d out of %d merged PRs checked by a CI test", totalTested, totalMerged)
return checker.CreateProportionalScoreResult(CheckCITests, reason, totalTested, totalMerged)
}
Expand Down
5 changes: 2 additions & 3 deletions checks/evaluation/ci_tests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func TestCITests(t *testing.T) {
},
result: scut.TestReturn{
Score: 10,

Check failure on line 43 in checks/evaluation/ci_tests_test.go

View workflow job for this annotation

GitHub Actions / check-linter

File is not `gci`-ed with --skip-generated -s standard -s default -s prefix(github.com/ossf/scorecard) (gci)
NumberOfInfo: 1,
NumberOfDebug: 1,
},
},
{
Expand Down Expand Up @@ -74,8 +74,7 @@ func TestCITests(t *testing.T) {
},
result: scut.TestReturn{
Score: 7,
NumberOfInfo: 3,
NumberOfDebug: 1,
NumberOfDebug: 4,
},
},
{
Expand Down

0 comments on commit 0f6383f

Please sign in to comment.