Skip to content

Commit

Permalink
Adjustments after review
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Hoeborn <f.hoeborn@gmail.com>
  • Loading branch information
fhoeborn committed Apr 1, 2024
1 parent 166c26b commit 77bbceb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion probes/hasPermissiveLicense/def.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ implementation: >
The implementation checks whether a permissive license is present
outcome:
- If a license file is found and is permissive, the probe returns a single OutcomePositive.
- If a license file is missing the probe returns a single OutcomeNotApplicable.
- If a license file is missing the probe returns a single OutcomeNegative.
- If the license is not permissive, the probe returns a single OutcomeNegative.
remediation:
effort: High
Expand Down
4 changes: 2 additions & 2 deletions probes/hasPermissiveLicense/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ func Run(raw *checker.RawResults) ([]finding.Finding, string, error) {
return nil, "", fmt.Errorf("%w: raw", uerror.ErrNil)
}

if raw.LicenseResults.LicenseFiles == nil || len(raw.LicenseResults.LicenseFiles) == 0 {
if len(raw.LicenseResults.LicenseFiles) == 0 {
f, err := finding.NewWith(fs, Probe,
"project does not have a license file", nil,
finding.OutcomeNotApplicable)
finding.OutcomeNegative)
if err != nil {
return nil, Probe, fmt.Errorf("create finding: %w", err)
}
Expand Down
6 changes: 3 additions & 3 deletions probes/hasPermissiveLicense/impl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func Test_Run(t *testing.T) {
},
},
outcomes: []finding.Outcome{
finding.OutcomeNotApplicable,
finding.OutcomeNegative,
},
},
{
Expand All @@ -94,7 +94,7 @@ func Test_Run(t *testing.T) {
},
},
outcomes: []finding.Outcome{
finding.OutcomeNotApplicable,
finding.OutcomeNegative,
},
},
{
Expand All @@ -105,7 +105,7 @@ func Test_Run(t *testing.T) {
},
},
outcomes: []finding.Outcome{
finding.OutcomeNotApplicable,
finding.OutcomeNegative,
},
},
}
Expand Down

0 comments on commit 77bbceb

Please sign in to comment.