Skip to content

Commit c348dfa

Browse files
committed
fix(scancode): Move --strip-root to non-config options
Whether the root path is stripped from the file paths for findings does not have an impact on scan results anymore because file paths are relativized for all scanners as of 6e68575. Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent ac2c5d6 commit c348dfa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

plugins/scanners/scancode/src/main/kotlin/ScanCodeConfig.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ data class ScanCodeConfig(
4343
"--copyright",
4444
"--license",
4545
"--info",
46-
"--strip-root",
4746
"--timeout ${DEFAULT_TIMEOUT.inWholeSeconds}"
4847
)
4948

@@ -52,6 +51,7 @@ data class ScanCodeConfig(
5251
*/
5352
private val DEFAULT_COMMAND_LINE_NON_CONFIG_OPTIONS = listOf(
5453
"--json-pp",
54+
"--strip-root",
5555
"--processes", max(1, Runtime.getRuntime().availableProcessors() - 1).toString()
5656
)
5757

plugins/scanners/scancode/src/test/kotlin/ScanCodeTest.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class ScanCodeTest : WordSpec({
4343

4444
"configuration" should {
4545
"return the default values if the scanner configuration is empty" {
46-
scanner.configuration shouldBe "--copyright --license --info --strip-root --timeout 300"
46+
scanner.configuration shouldBe "--copyright --license --info --timeout 300"
4747
}
4848

4949
"return the non-config values from the scanner configuration" {
@@ -63,9 +63,9 @@ class ScanCodeTest : WordSpec({
6363
"getCommandLineOptions()" should {
6464
"contain the default values if the scanner configuration is empty" {
6565
scanner.getCommandLineOptions("31.2.4").joinToString(" ") shouldMatch
66-
"--copyright --license --info --strip-root --timeout 300 --json-pp --processes \\d+"
66+
"--copyright --license --info --timeout 300 --json-pp --strip-root --processes \\d+"
6767
scanner.getCommandLineOptions("32.0.0").joinToString(" ") shouldMatch
68-
"--copyright --license --info --strip-root --timeout 300 --json-pp --processes \\d+ " +
68+
"--copyright --license --info --timeout 300 --json-pp --strip-root --processes \\d+ " +
6969
"--license-references"
7070
}
7171

0 commit comments

Comments
 (0)