From 3369bf27635a101cc1fdd41057c20b409973a804 Mon Sep 17 00:00:00 2001 From: abhiseksanyal Date: Tue, 11 Oct 2022 20:15:30 +0530 Subject: [PATCH] Enable Binary artifacts check for local repos (#2) Enable Binary artifacts check for local repositories that was disabled in the PR #2039 and revert the change done for empty repository handling in the PR #2207 --- checks/binary_artifact.go | 1 + pkg/scorecard.go | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/checks/binary_artifact.go b/checks/binary_artifact.go index 63a7ec98794..1fac6ca3442 100644 --- a/checks/binary_artifact.go +++ b/checks/binary_artifact.go @@ -27,6 +27,7 @@ const CheckBinaryArtifacts string = "Binary-Artifacts" //nolint:gochecknoinits func init() { supportedRequestTypes := []checker.RequestType{ + checker.FileBased, checker.CommitBased, checker.FileBased, } diff --git a/pkg/scorecard.go b/pkg/scorecard.go index b8c1a4e1691..b3b5c1ddbd7 100644 --- a/pkg/scorecard.go +++ b/pkg/scorecard.go @@ -122,9 +122,7 @@ func RunScorecard(ctx context.Context, commitSHA, err := getRepoCommitHash(repoClient) - if errors.Is(err, errEmptyRepository) { - return ret, nil - } else if err != nil { + if err != nil { return ScorecardResult{}, err } ret.Repo.CommitSHA = commitSHA