mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-13 07:25:08 +01:00
Replace Spotless with simple python lint script
This commit is contained in:
27
build.gradle
27
build.gradle
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user