From f17c4c501415feb5a971f43ea2f58d53f26b5c70 Mon Sep 17 00:00:00 2001 From: Stephan Krusche Date: Sat, 26 Oct 2024 13:39:22 +0200 Subject: [PATCH] only apply spotless to changes from develop --- build.gradle | 7 +++++-- linting.sh | 15 +-------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/build.gradle b/build.gradle index 52ed6f06d61f..f7babb9b76d7 100644 --- a/build.gradle +++ b/build.gradle @@ -55,11 +55,15 @@ idea { } spotless { + // allows to execute the code formatting commands ./gradlew spotlessApply and ./gradlew spotlessCheck java { target { fileTree(rootDir) { - include "**/*.java" + include ( + "src/main/java/**/*.java", + "src/test/java/**/*.java", + ) exclude( "**/src/test/resources/test-data/repository-export/EncodingISO_8559_1.java", "**/node_modules/**", @@ -71,7 +75,6 @@ spotless { "**/src/main/resources/templates/**", "/docker/**", "checked-out-repos/**", - "**/src/main/java/org/eclipse/**", "supporting_scripts/**" ) } diff --git a/linting.sh b/linting.sh index 1bb19ae388e6..1fff1374d5be 100755 --- a/linting.sh +++ b/linting.sh @@ -1,16 +1,3 @@ #!/bin/sh -join_by () { - local IFS="$1"; - shift; - echo "$*"; -} -FILES=$(join_by "," "$@") - -if [[ "$OSTYPE" == "msys" ]]; then - # replace backslashes with double backslashes in Windows file paths when - # using MinGW (msys = lightweight shell and GNU utilities compiled for Windows (part of MinGW) - FILES=$(echo $FILES | sed 's/\\/\\\\/g') -fi - -./gradlew spotlessApply -PspotlessFiles="${FILES}" +./gradlew spotlessApply -PratchetFrom='develop'