Skip to content

Commit

Permalink
chore(scanoss): Do not apply the BlacklistRules
Browse files Browse the repository at this point in the history
This is a preparation for migrating from the currently used library [1],
which is deprecated, to the newer library [2] which does not offer
`BlacklistRules` anymore. The newer library instead skips certain file
extensions itself as part of the winnowing algorithm, see [3].

[1]: https://github.com/scanoss/scanner.java
[2]: https://github.com/scanoss/scanoss.java
[3]: https://github.com/scanoss/scanoss.java/blob/8598c47/src/main/java/com/scanoss/Winnowing.java#L204-L210

Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
  • Loading branch information
sschuberth committed Aug 11, 2024
1 parent b579f88 commit f8dc4e3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions plugins/scanners/scanoss/src/main/kotlin/ScanOss.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

package org.ossreviewtoolkit.plugins.scanners.scanoss

import com.scanoss.scanner.BlacklistRules
import com.scanoss.scanner.Scanner
import com.scanoss.scanner.Winnowing

Expand Down Expand Up @@ -96,8 +95,7 @@ class ScanOss internal constructor(
val wfpString = buildString {
path.walk()
.onEnter { it.name !in VCS_DIRECTORIES }
// TODO: Consider not applying the (somewhat arbitrary) blacklist.
.filterNot { it.isDirectory || BlacklistRules.hasBlacklistedExt(it.name) }
.filterNot { it.isDirectory }
.forEach {
logger.info { "Computing fingerprint for file ${it.absolutePath}..." }
append(createWfpForFile(it))
Expand Down

0 comments on commit f8dc4e3

Please sign in to comment.