From 32168b457023a312894f93a1ccf1fa707cb8f99a 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 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/checks/binary_artifact.go b/checks/binary_artifact.go index 354e9cbc1f6..501f4f79433 100644 --- a/checks/binary_artifact.go +++ b/checks/binary_artifact.go @@ -27,6 +27,7 @@ const CheckBinaryArtifacts string = "Binary-Artifacts" //nolint func init() { supportedRequestTypes := []checker.RequestType{ + checker.FileBased, checker.CommitBased, } if err := registerCheck(CheckBinaryArtifacts, BinaryArtifacts, supportedRequestTypes); err != nil { diff --git a/pkg/scorecard.go b/pkg/scorecard.go index d44976bf8a7..a83661fae3b 100644 --- a/pkg/scorecard.go +++ b/pkg/scorecard.go @@ -105,7 +105,7 @@ func RunScorecard(ctx context.Context, defer repoClient.Close() commitSHA, err := getRepoCommitHash(repoClient) - if err != nil || commitSHA == "" { + if err != nil { return ScorecardResult{}, err } defaultBranch, err := repoClient.GetDefaultBranchName()