diff --git a/.gitea/workflows/qs.yml b/.gitea/workflows/qs.yml index 43fcf81..637dd4f 100644 --- a/.gitea/workflows/qs.yml +++ b/.gitea/workflows/qs.yml @@ -4,7 +4,7 @@ on: - pull_request jobs: - oas: + test: name: "Gradle Check" runs-on: "ubuntu-latest" container: @@ -25,4 +25,26 @@ jobs: - name: "Check" run: gradle check - name: "Stop Gradle" - run: gradle --stop \ No newline at end of file + run: gradle --stop + checkstyle: + name: "Gradle Check" + runs-on: "ubuntu-latest" + container: + image: "cimg/openjdk:21.0-node" + steps: + - name: "Checkout" + uses: actions/checkout@v3 + - uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: "Prepare Gradle" + run: gradle clean + - name: "Check" + run: gradle check + - name: "Stop Gradle" + run: gradle --stop diff --git a/build.gradle.kts b/build.gradle.kts index 3bc0350..6306cff 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,6 +2,24 @@ plugins { java id("org.springframework.boot") version "3.3.4" id("io.spring.dependency-management") version "1.1.6" + id("checkstyle") +} + +tasks.withType { + reports { + xml.required.set(false) + html.required.set(true) + } +} + +tasks.withType { + reports { + // Disable HTML report + html.required.set(false) + + // Disable XML report + xml.required.set(false) + } } group = "de.szut" diff --git a/config/checkstyle/checkstyle-ignore.xml b/config/checkstyle/checkstyle-ignore.xml new file mode 100644 index 0000000..fe3b2fe --- /dev/null +++ b/config/checkstyle/checkstyle-ignore.xml @@ -0,0 +1,9 @@ + + + + + + diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml new file mode 100644 index 0000000..d8f0701 --- /dev/null +++ b/config/checkstyle/checkstyle.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/de/szut/lf8_starter/config/OpenAPIConfiguration.java b/src/main/java/de/szut/lf8_starter/config/OpenAPIConfiguration.java index 0501902..1b2282b 100644 --- a/src/main/java/de/szut/lf8_starter/config/OpenAPIConfiguration.java +++ b/src/main/java/de/szut/lf8_starter/config/OpenAPIConfiguration.java @@ -57,4 +57,4 @@ public class OpenAPIConfiguration { } -} \ No newline at end of file +} diff --git a/src/main/java/de/szut/lf8_starter/security/KeycloakLogoutHandler.java b/src/main/java/de/szut/lf8_starter/security/KeycloakLogoutHandler.java index 3cc82f7..8555ef9 100644 --- a/src/main/java/de/szut/lf8_starter/security/KeycloakLogoutHandler.java +++ b/src/main/java/de/szut/lf8_starter/security/KeycloakLogoutHandler.java @@ -46,4 +46,4 @@ public class KeycloakLogoutHandler implements LogoutHandler { } } -} \ No newline at end of file +} diff --git a/src/main/java/de/szut/lf8_starter/security/KeycloakSecurityConfig.java b/src/main/java/de/szut/lf8_starter/security/KeycloakSecurityConfig.java index d47d6ec..ea9e354 100644 --- a/src/main/java/de/szut/lf8_starter/security/KeycloakSecurityConfig.java +++ b/src/main/java/de/szut/lf8_starter/security/KeycloakSecurityConfig.java @@ -94,4 +94,4 @@ class KeycloakSecurityConfig { }); return jwtAuthenticationConverter; } -} \ No newline at end of file +}