From 5007b81b9f1054c0751aca3e62e3a1195a907bc5 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Tue, 17 Dec 2024 09:32:08 +0100 Subject: [PATCH] chore(scancode): Print JSON raw results non-pretty ScanCode's raw JSON results are not exposed by ORT and thus not looked at by humans. So disable pretty-printing for the chance of a tad quicker result generation. Signed-off-by: Sebastian Schuberth --- gradle/gradle-daemon-jvm.properties | 1 + plugins/scanners/scancode/src/main/kotlin/ScanCode.kt | 2 +- plugins/scanners/scancode/src/test/kotlin/ScanCodeTest.kt | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gradle/gradle-daemon-jvm.properties b/gradle/gradle-daemon-jvm.properties index 574deb415c56e..58b210e4d6485 100644 --- a/gradle/gradle-daemon-jvm.properties +++ b/gradle/gradle-daemon-jvm.properties @@ -1,3 +1,4 @@ # The version of the JDK to use for building ORT. # Keep this aligned with `javaLanguageVersion` in `gradle.properties`. toolchainVersion = 21 +toolchainVendor = Adoptium diff --git a/plugins/scanners/scancode/src/main/kotlin/ScanCode.kt b/plugins/scanners/scancode/src/main/kotlin/ScanCode.kt index 0321a3319bd1c..cbc9df5129491 100644 --- a/plugins/scanners/scancode/src/main/kotlin/ScanCode.kt +++ b/plugins/scanners/scancode/src/main/kotlin/ScanCode.kt @@ -76,7 +76,7 @@ class ScanCode internal constructor( const val SCANNER_NAME = "ScanCode" private const val LICENSE_REFERENCES_OPTION_VERSION = "32.0.0" - private const val OUTPUT_FORMAT_OPTION = "--json-pp" + private const val OUTPUT_FORMAT_OPTION = "--json" } class Factory : ScannerWrapperFactory(SCANNER_NAME) { diff --git a/plugins/scanners/scancode/src/test/kotlin/ScanCodeTest.kt b/plugins/scanners/scancode/src/test/kotlin/ScanCodeTest.kt index 4662512dbd8c9..048ada58684f2 100644 --- a/plugins/scanners/scancode/src/test/kotlin/ScanCodeTest.kt +++ b/plugins/scanners/scancode/src/test/kotlin/ScanCodeTest.kt @@ -44,7 +44,7 @@ class ScanCodeTest : WordSpec({ "configuration" should { "return the default values if the scanner configuration is empty" { - scanner.configuration shouldBe "--copyright --license --info --strip-root --timeout 300 --json-pp" + scanner.configuration shouldBe "--copyright --license --info --strip-root --timeout 300 --json" } "return the non-config values from the scanner configuration" { @@ -57,7 +57,7 @@ class ScanCodeTest : WordSpec({ val scannerWithConfig = ScanCode("ScanCode", config, ScannerWrapperConfig.EMPTY) - scannerWithConfig.configuration shouldBe "--command --line --json-pp" + scannerWithConfig.configuration shouldBe "--command --line --json" } }