Compare commits
3 commits
2c0c476b3a
...
dfb03a1eb1
Author | SHA1 | Date | |
---|---|---|---|
dfb03a1eb1 | |||
6e4a925328 | |||
424d7ac95a |
11 changed files with 167 additions and 14 deletions
|
@ -15,7 +15,11 @@ jobs:
|
||||||
uses: "https://git.euph.dev/actions/checkout@v3"
|
uses: "https://git.euph.dev/actions/checkout@v3"
|
||||||
- name: "Prepare Gradle"
|
- name: "Prepare Gradle"
|
||||||
run: gradle clean
|
run: gradle clean
|
||||||
- name: "Checkstyle Linting Main"
|
- name: "Linting Main"
|
||||||
run: gradle checkstyleMain
|
run: gradle checkstyleMain
|
||||||
- name: "Checkstyle Linting Test"
|
- name: "Linting Test"
|
||||||
run: gradle checkstyleTest
|
run: gradle checkstyleTest
|
||||||
|
- name: "Static Analysis Main"
|
||||||
|
run: gradle spotbugsMain
|
||||||
|
- name: "Static Analysis Test"
|
||||||
|
run: gradle spotbugsTest
|
11
.run/Check.run.xml
Normal file
11
.run/Check.run.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Check" type="CompoundRunConfigurationType">
|
||||||
|
<toRun name="Main Lint" type="GradleRunConfiguration" />
|
||||||
|
<toRun name="Main Static Analysis" type="GradleRunConfiguration" />
|
||||||
|
<toRun name="OAS Validate" type="GradleRunConfiguration" />
|
||||||
|
<toRun name="Test" type="GradleRunConfiguration" />
|
||||||
|
<toRun name="Test Lint" type="GradleRunConfiguration" />
|
||||||
|
<toRun name="Test Static Analysis" type="GradleRunConfiguration" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
24
.run/Main Lint.run.xml
Normal file
24
.run/Main Lint.run.xml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Main Lint" type="GradleRunConfiguration" factoryName="Gradle">
|
||||||
|
<ExternalSystemSettings>
|
||||||
|
<option name="executionName" />
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="externalSystemIdString" value="GRADLE" />
|
||||||
|
<option name="scriptParameters" value="" />
|
||||||
|
<option name="taskDescriptions">
|
||||||
|
<list />
|
||||||
|
</option>
|
||||||
|
<option name="taskNames">
|
||||||
|
<list>
|
||||||
|
<option value="checkstyleMain" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
<option name="vmOptions" />
|
||||||
|
</ExternalSystemSettings>
|
||||||
|
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||||
|
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||||
|
<DebugAllEnabled>false</DebugAllEnabled>
|
||||||
|
<RunAsTest>false</RunAsTest>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
24
.run/Main Static Analysis.run.xml
Normal file
24
.run/Main Static Analysis.run.xml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Main Static Analysis" type="GradleRunConfiguration" factoryName="Gradle">
|
||||||
|
<ExternalSystemSettings>
|
||||||
|
<option name="executionName" />
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="externalSystemIdString" value="GRADLE" />
|
||||||
|
<option name="scriptParameters" value="" />
|
||||||
|
<option name="taskDescriptions">
|
||||||
|
<list />
|
||||||
|
</option>
|
||||||
|
<option name="taskNames">
|
||||||
|
<list>
|
||||||
|
<option value="spotbugsMain" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
<option name="vmOptions" />
|
||||||
|
</ExternalSystemSettings>
|
||||||
|
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||||
|
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||||
|
<DebugAllEnabled>false</DebugAllEnabled>
|
||||||
|
<RunAsTest>false</RunAsTest>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
|
@ -1,5 +1,5 @@
|
||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Generate From OAS" type="GradleRunConfiguration" factoryName="Gradle">
|
<configuration default="false" name="OAS Generate" type="GradleRunConfiguration" factoryName="Gradle">
|
||||||
<ExternalSystemSettings>
|
<ExternalSystemSettings>
|
||||||
<option name="executionName" />
|
<option name="executionName" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
|
@ -1,5 +1,5 @@
|
||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Validate OAS" type="GradleRunConfiguration" factoryName="Gradle">
|
<configuration default="false" name="OAS Validate" type="GradleRunConfiguration" factoryName="Gradle">
|
||||||
<ExternalSystemSettings>
|
<ExternalSystemSettings>
|
||||||
<option name="executionName" />
|
<option name="executionName" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
24
.run/Test Lint.run.xml
Normal file
24
.run/Test Lint.run.xml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Test Lint" type="GradleRunConfiguration" factoryName="Gradle">
|
||||||
|
<ExternalSystemSettings>
|
||||||
|
<option name="executionName" />
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="externalSystemIdString" value="GRADLE" />
|
||||||
|
<option name="scriptParameters" value="" />
|
||||||
|
<option name="taskDescriptions">
|
||||||
|
<list />
|
||||||
|
</option>
|
||||||
|
<option name="taskNames">
|
||||||
|
<list>
|
||||||
|
<option value="checkstyleTest" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
<option name="vmOptions" />
|
||||||
|
</ExternalSystemSettings>
|
||||||
|
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||||
|
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||||
|
<DebugAllEnabled>false</DebugAllEnabled>
|
||||||
|
<RunAsTest>false</RunAsTest>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
22
.run/Test Static Analysis.run.xml
Normal file
22
.run/Test Static Analysis.run.xml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Test Static Analysis" type="GradleRunConfiguration" factoryName="Gradle">
|
||||||
|
<ExternalSystemSettings>
|
||||||
|
<option name="executionName" />
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="externalSystemIdString" value="GRADLE" />
|
||||||
|
<option name="scriptParameters" value="" />
|
||||||
|
<option name="taskDescriptions">
|
||||||
|
<list />
|
||||||
|
</option>
|
||||||
|
<option name="taskNames">
|
||||||
|
<list />
|
||||||
|
</option>
|
||||||
|
<option name="vmOptions" />
|
||||||
|
</ExternalSystemSettings>
|
||||||
|
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||||
|
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||||
|
<DebugAllEnabled>false</DebugAllEnabled>
|
||||||
|
<RunAsTest>false</RunAsTest>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
24
.run/Test.run.xml
Normal file
24
.run/Test.run.xml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Test" type="GradleRunConfiguration" factoryName="Gradle">
|
||||||
|
<ExternalSystemSettings>
|
||||||
|
<option name="executionName" />
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="externalSystemIdString" value="GRADLE" />
|
||||||
|
<option name="scriptParameters" value="" />
|
||||||
|
<option name="taskDescriptions">
|
||||||
|
<list />
|
||||||
|
</option>
|
||||||
|
<option name="taskNames">
|
||||||
|
<list>
|
||||||
|
<option value="test" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
<option name="vmOptions" />
|
||||||
|
</ExternalSystemSettings>
|
||||||
|
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||||
|
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||||
|
<DebugAllEnabled>false</DebugAllEnabled>
|
||||||
|
<RunAsTest>false</RunAsTest>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
|
@ -1,3 +1,6 @@
|
||||||
|
import com.github.spotbugs.snom.Confidence
|
||||||
|
import com.github.spotbugs.snom.Effort
|
||||||
|
import com.github.spotbugs.snom.SpotBugsTask
|
||||||
import org.hidetake.gradle.swagger.generator.GenerateSwaggerCode
|
import org.hidetake.gradle.swagger.generator.GenerateSwaggerCode
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -7,6 +10,7 @@ repositories {
|
||||||
plugins {
|
plugins {
|
||||||
java
|
java
|
||||||
checkstyle
|
checkstyle
|
||||||
|
id("com.github.spotbugs") version "6.0.22"
|
||||||
id("org.springframework.boot") version "3.3.3"
|
id("org.springframework.boot") version "3.3.3"
|
||||||
id("io.spring.dependency-management") version "1.1.6"
|
id("io.spring.dependency-management") version "1.1.6"
|
||||||
id("org.hidetake.swagger.generator") version "2.19.2"
|
id("org.hidetake.swagger.generator") version "2.19.2"
|
||||||
|
@ -17,6 +21,12 @@ checkstyle {
|
||||||
configFile = file("src/main/resources/checkstyle.xml")
|
configFile = file("src/main/resources/checkstyle.xml")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spotbugs {
|
||||||
|
toolVersion = "4.8.6"
|
||||||
|
effort.set(Effort.MAX)
|
||||||
|
reportLevel.set(Confidence.LOW)
|
||||||
|
}
|
||||||
|
|
||||||
group = "de.hmmh"
|
group = "de.hmmh"
|
||||||
version = "0.0.1-SNAPSHOT"
|
version = "0.0.1-SNAPSHOT"
|
||||||
|
|
||||||
|
@ -63,13 +73,24 @@ swaggerSources {
|
||||||
code(delegateClosureOf<GenerateSwaggerCode> {
|
code(delegateClosureOf<GenerateSwaggerCode> {
|
||||||
language = "spring"
|
language = "spring"
|
||||||
components = listOf("models", "apis", "supportingFiles=ApiUtil.java")
|
components = listOf("models", "apis", "supportingFiles=ApiUtil.java")
|
||||||
code.rawOptions = listOf("--ignore-file-override=" + file("${rootDir}/src/main/resources/.codegen-ignore").absolutePath)
|
code.rawOptions =
|
||||||
|
listOf("--ignore-file-override=" + file("${rootDir}/src/main/resources/.codegen-ignore").absolutePath)
|
||||||
dependsOn(validationTask)
|
dependsOn(validationTask)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
|
|
||||||
|
withType<Checkstyle> {
|
||||||
|
reports {
|
||||||
|
xml.required.set(true)
|
||||||
|
html.required.set(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
withType<SpotBugsTask> {
|
||||||
|
excludeFilter.set(file("${rootDir}/src/main/resources/spotbugs-exclude.xml"))
|
||||||
|
}
|
||||||
processResources {
|
processResources {
|
||||||
dependsOn(generateSwaggerCode)
|
dependsOn(generateSwaggerCode)
|
||||||
}
|
}
|
||||||
|
@ -79,12 +100,6 @@ tasks {
|
||||||
named("compileJava").configure {
|
named("compileJava").configure {
|
||||||
dependsOn(swaggerSources.getByName("pmt").code)
|
dependsOn(swaggerSources.getByName("pmt").code)
|
||||||
}
|
}
|
||||||
withType<Checkstyle> {
|
|
||||||
reports {
|
|
||||||
xml.required.set(true)
|
|
||||||
html.required.set(false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|
5
src/main/resources/spotbugs-exclude.xml
Normal file
5
src/main/resources/spotbugs-exclude.xml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<FindBugsFilter>
|
||||||
|
<Match>
|
||||||
|
<Package name="de.hmmh.pmt.oas"/>
|
||||||
|
</Match>
|
||||||
|
</FindBugsFilter>
|
Loading…
Reference in a new issue