Replace Spotless with simple python lint script

This commit is contained in:
AnimeGitB
2022-07-11 22:21:11 +09:30
committed by memetrollsXD
parent 24e9c55afa
commit 5e6a1f399c
4 changed files with 77 additions and 34 deletions

View File

@@ -34,9 +34,6 @@ plugins {
// Maven
id 'maven-publish'
id 'signing'
// Spotless formatter
id "com.diffplug.spotless" version "6.8.0"
}
compileJava.options.encoding = "UTF-8"
@@ -241,30 +238,6 @@ eclipse {
}
}
spotless {
// optional: limit format enforcement to just the files changed by this feature branch
ratchetFrom 'LintRatchet'
format 'misc', {
// define the files to apply `misc` to
target '*.gradle', '*.md', '.gitignore'
// define the steps to apply to those files
trimTrailingWhitespace()
indentWithSpaces() // or spaces. Takes an integer argument if you don't like 4
endWithNewline()
}
java {
// don't need to set target, it is inferred from java
// define the steps to apply to those files
trimTrailingWhitespace()
indentWithSpaces() // or spaces. Takes an integer argument if you don't like 4
endWithNewline()
replaceRegex('Force one space between if/etc. and ( or {', '(?<=\\b(?:if|for|while|switch|try|else|catch|finally|synchronized)) *(?=[\\(\\{])', ' ')
replaceRegex('Force one space between ) and {', '\\) *\\{(?!\\})', ') {')
}
}
signing {
if(!version.endsWith('-dev')) {
sign publishing.publications.mavenJava