From 333618d0d2bb1a04669ffe305e7fb74ab5293d70 Mon Sep 17 00:00:00 2001 From: Azeem Shaikh Date: Thu, 7 Apr 2022 12:12:22 -0700 Subject: [PATCH] `Security-Policy` should not run on `--local` (#1825) Co-authored-by: Azeem Shaikh --- checks/raw/security_policy.go | 5 ----- checks/raw/security_policy_test.go | 4 ---- checks/security_policy.go | 1 - 3 files changed, 10 deletions(-) diff --git a/checks/raw/security_policy.go b/checks/raw/security_policy.go index 519477ff073..dca5e99589d 100644 --- a/checks/raw/security_policy.go +++ b/checks/raw/security_policy.go @@ -41,11 +41,6 @@ func SecurityPolicy(c *checker.CheckRequest) (checker.SecurityPolicyData, error) } // Check if present in parent org. - parentOrg := c.Repo.Org() - if parentOrg == nil { - return checker.SecurityPolicyData{}, nil - } - // https#://docs.github.com/en/github/building-a-strong-community/creating-a-default-community-health-file. // TODO(1491): Make this non-GitHub specific. logger := log.NewLogger(log.InfoLevel) diff --git a/checks/raw/security_policy_test.go b/checks/raw/security_policy_test.go index 28f136dda35..ae5d3089601 100644 --- a/checks/raw/security_policy_test.go +++ b/checks/raw/security_policy_test.go @@ -99,10 +99,6 @@ func TestSecurityPolicy(t *testing.T) { "doc/security.rst", }, }, - { - name: "early return if org is null", - files: []string{}, - }, } for _, tt := range tests { tt := tt diff --git a/checks/security_policy.go b/checks/security_policy.go index 5d8ec594a14..29192cc14ee 100644 --- a/checks/security_policy.go +++ b/checks/security_policy.go @@ -27,7 +27,6 @@ const CheckSecurityPolicy = "Security-Policy" //nolint:gochecknoinits func init() { supportedRequestTypes := []checker.RequestType{ - checker.FileBased, checker.CommitBased, } if err := registerCheck(CheckSecurityPolicy, SecurityPolicy, supportedRequestTypes); err != nil {