build: add checkstyle configuration and workflow jobs
All checks were successful
Quality Check / Gradle Check (pull_request) Successful in 4m19s

This commit is contained in:
Jan Gleytenhoover 2024-09-25 10:34:06 +02:00
parent 7fc19b5bbe
commit 37c9a466d5
Signed by: jank
GPG Key ID: B267751B8AE29EFE
7 changed files with 77 additions and 5 deletions

@ -4,7 +4,29 @@ on:
- pull_request
jobs:
oas:
test:
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
checkstyle:
name: "Gradle Check"
runs-on: "ubuntu-latest"
container:

@ -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<Checkstyle> {
reports {
xml.required.set(false)
html.required.set(true)
}
}
tasks.withType<Checkstyle> {
reports {
// Disable HTML report
html.required.set(false)
// Disable XML report
xml.required.set(false)
}
}
group = "de.szut"

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.2//EN"
"https://checkstyle.org/dtds/suppressions_1_2.dtd"
>
<suppressions>
<suppress files="[\\/]de[\\/]hmmh[\\/]pmt[\\/]oas" checks="."/>
</suppressions>

@ -0,0 +1,23 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd"
>
<module name="Checker">
<module name="SuppressionFilter">
<property name="file" value="${config_loc}/checkstyle-ignore.xml"/>
</module>
<property name="severity" value="error"/>
<property name="tabWidth" value="4"/>
<module name="LineLength">
<property name="max" value="500"/>
</module>
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
<module name="NewlineAtEndOfFile"/>
</module>