Merge branch 'main' into chore/remove-unused
This commit is contained in:
commit
c8c62b91f3
5 changed files with 68 additions and 2 deletions
|
@ -4,6 +4,39 @@ on:
|
|||
pull_request:
|
||||
|
||||
jobs:
|
||||
checkstyle:
|
||||
name: "Checkstyle Main"
|
||||
runs-on: "vps-4"
|
||||
container:
|
||||
image: "cimg/openjdk:22.0-node"
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Java 22
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: "temurin"
|
||||
java-version: "22"
|
||||
|
||||
- uses: actions/cache@v3
|
||||
working-directory: ./backend
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: "Prepare Gradle"
|
||||
working-directory: ./backend
|
||||
run: gradle clean
|
||||
- name: "Check"
|
||||
working-directory: ./backend
|
||||
run: gradle checkstyleMain
|
||||
- name: "Stop Gradle"
|
||||
working-directory: ./backend
|
||||
run: gradle --stop
|
||||
|
||||
eslint:
|
||||
name: eslint
|
||||
runs-on: vps-4
|
||||
|
|
|
@ -2,6 +2,21 @@ plugins {
|
|||
java
|
||||
id("org.springframework.boot") version "3.3.3"
|
||||
id("io.spring.dependency-management") version "1.1.6"
|
||||
id("checkstyle")
|
||||
}
|
||||
|
||||
checkstyle {
|
||||
configFile = file("$rootDir/config/checkstyle/checkstyle.xml")
|
||||
}
|
||||
|
||||
tasks.withType<Checkstyle> {
|
||||
reports {
|
||||
// Disable HTML report
|
||||
html.required.set(false)
|
||||
|
||||
// Disable XML report
|
||||
xml.required.set(false)
|
||||
}
|
||||
}
|
||||
|
||||
group = "de.szut"
|
||||
|
|
18
backend/config/checkstyle/checkstyle.xml
Normal file
18
backend/config/checkstyle/checkstyle.xml
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?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">
|
||||
<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>
|
Reference in a new issue