Skip to content

Commit dfa4ee1

Browse files
isasmendiagussschuberth
authored andcommitted
refactor(scanoss): Set SCANOSS matcher property to null
It forces the SCANOSS scanner's matcher property to null to prevent loading results from scan storage. This follows the same approach implemented for other snippet scanners, where the consensus was that snippet scanner results should never come from scan storage. This fixes an issue where `context.excludes` was being nullified in `ScanOss.scanPath()`, preventing proper application of exclusion patterns. Signed-off-by: Agustin Isasmendi <[email protected]>
1 parent b03e57a commit dfa4ee1

File tree

1 file changed

+1
-12
lines changed
  • plugins/scanners/scanoss/src/main/kotlin

1 file changed

+1
-12
lines changed

plugins/scanners/scanoss/src/main/kotlin/ScanOss.kt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import org.ossreviewtoolkit.plugins.api.PluginDescriptor
3232
import org.ossreviewtoolkit.scanner.PathScannerWrapper
3333
import org.ossreviewtoolkit.scanner.ScanContext
3434
import org.ossreviewtoolkit.scanner.ScannerMatcher
35-
import org.ossreviewtoolkit.scanner.ScannerMatcherConfig
3635
import org.ossreviewtoolkit.scanner.ScannerWrapperFactory
3736

3837
@OrtPlugin(
@@ -57,17 +56,7 @@ class ScanOss(
5756

5857
override val configuration = ""
5958

60-
override val matcher by lazy {
61-
ScannerMatcher.create(
62-
details,
63-
ScannerMatcherConfig(
64-
config.regScannerName,
65-
config.minVersion,
66-
config.maxVersion,
67-
configuration
68-
)
69-
)
70-
}
59+
override val matcher: ScannerMatcher? = null
7160

7261
override val readFromStorage = config.readFromStorage
7362

0 commit comments

Comments
 (0)