Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/java-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6 # v3.5.0
Expand All @@ -35,4 +37,9 @@ jobs:
run: chmod +x gradlew

- name: Run Spotless Check
run: ./gradlew spotlessCheck --no-daemon
run: |
if [ -n "${{github.base_ref}}" ]; then
./gradlew spotlessCheck --no-daemon -PdiffBase=origin/${{github.base_ref}}
else
./gradlew spotlessCheck --no-daemon
fi
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ allprojects {
apply plugin: 'com.diffplug.spotless'

spotless {
def diffBase = findProperty('diffBase')

if (diffBase) {
ratchetFrom diffBase
}
java {
eclipse().configFile("${rootDir}/editor-settings/iplass-codestyle-eclipse/eclipse-java-formatter.xml")
importOrder( 'javax', 'java', 'org' , "")
Expand Down
Loading