Skip to content

Commit

Permalink
Use spotless to format java, yml and sql files
Browse files Browse the repository at this point in the history
  • Loading branch information
Portals committed Feb 20, 2024
1 parent fd7aab7 commit 05bb240
Show file tree
Hide file tree
Showing 321 changed files with 14,038 additions and 15,179 deletions.
9 changes: 0 additions & 9 deletions app/.run/GammaApplication.run.xml

This file was deleted.

23 changes: 0 additions & 23 deletions app/.run/Tests in 'gamma.test'.run.xml

This file was deleted.

46 changes: 24 additions & 22 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ buildscript {
plugins {
id "java"
id "application"
id "checkstyle"
id "pmd"
id "nebula.lint" version "16.7.0"
id 'org.springframework.boot' version '3.2.0'
id 'io.spring.dependency-management' version '1.1.4'
id "com.diffplug.spotless" version "6.25.0"
}

java {
Expand Down Expand Up @@ -95,7 +93,7 @@ dependencies {
"org.springframework.boot:spring-boot-starter-test:3.1.2",
"org.springframework.security:spring-security-test:6.1.2",
"org.testcontainers:junit-jupiter:1.18.3",
"org.testcontainers:postgresql:1.18.3",
"org.testcontainers:postgresql:1.18.3"
)
}

Expand All @@ -113,23 +111,27 @@ repositories {
mavenCentral()
}

checkstyle {
toolVersion = "8.11"
ignoreFailures = false
maxWarnings = 0
configFile = project(":").file("config/checkstyle/checkstyle.xml")
configProperties = ["suppressionFile": project(":").file("config/checkstyle/suppressions.xml")]
}
spotless {
java {
importOrder()
removeUnusedImports()
googleJavaFormat()
formatAnnotations()
}

pmd {
toolVersion = "6.21.0"
consoleOutput = false
ignoreFailures = false
ruleSets = []
ruleSetConfig = resources.text.fromFile("./config/pmd/ruleset.xml")
}
sql {
target 'src/**/*.sql'

dbeaver()
}

// Is not perfect, but gives you an idea of what needs to be changed
//gradleLint {
// rules = ["dependency-parentheses", "archaic-wrapper"]
//}
yaml {
target 'src/**/*.yml'
jackson()
}

json {
target 'src/**/*.json'
jackson()
}
}
232 changes: 0 additions & 232 deletions app/config/checkstyle/checkstyle.xml

This file was deleted.

9 changes: 0 additions & 9 deletions app/config/checkstyle/suppressions.xml

This file was deleted.

Loading

0 comments on commit 05bb240

Please sign in to comment.