diff --git a/.github/workflows/reusable_workflow_verify.yaml b/.github/workflows/reusable_workflow_verify.yaml index 44e01e58f..44e5fc143 100644 --- a/.github/workflows/reusable_workflow_verify.yaml +++ b/.github/workflows/reusable_workflow_verify.yaml @@ -61,5 +61,12 @@ jobs: - name: Check file license headers run: mvn license:check -PcheckLicense --batch-mode + - name: Check code style + run: | + # compare style to target branch + git remote add target ${{ github.event.pull_request.base.repo.clone_url }} + git fetch target + mvn spotless:check -DratchetFrom=${{ github.event.pull_request.base.sha }} + - name: Run tests & javadoc run: mvn clean verify javadoc:javadoc -DdetectOfflineLinks=false -PgenerateTestReport ${{ inputs.maven_properties }} --batch-mode \ No newline at end of file diff --git a/pom.xml b/pom.xml index 252425c45..d2cd6b722 100644 --- a/pom.xml +++ b/pom.xml @@ -130,6 +130,7 @@ false + origin/master @@ -368,6 +369,25 @@ org.jacoco jacoco-maven-plugin + + + com.diffplug.spotless + spotless-maven-plugin + + ${ratchetFrom} + + + ${maven.multiModuleProjectDirectory}/eclipse_codeformatter.xml + + + +