Skip to content

Commit 7822f07

Browse files
committed
fix(licensee): Handle "NOASSERTION" findings
Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 9a0dbe8 commit 7822f07

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

plugins/scanners/licensee/src/main/kotlin/Licensee.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ class Licensee(
171171
LicenseFinding(
172172
license = it.matchedLicense,
173173
location = TextLocation(it.filename, TextLocation.UNKNOWN_LINE),
174-
score = it.matcher.confidence
174+
score = it.matcher?.confidence ?: 0.0f
175175
)
176176
}
177177

plugins/scanners/licensee/src/main/kotlin/LicenseeResultModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ data class LicenseeResult(
2929
@Serializable
3030
data class MatchedFile(
3131
val filename: String,
32-
val matcher: MatcherInfo,
32+
val matcher: MatcherInfo?, // May be `null` in case of "NOASSERTION".
3333
val matchedLicense: String
3434
)
3535

0 commit comments

Comments
 (0)