Add the spotless gradle plugin to use the diktat formatter
This commit is contained in:
parent
c2de7cdf65
commit
7fa9c07b54
|
@ -0,0 +1,35 @@
|
|||
- name: HEADER_MISSING_OR_WRONG_COPYRIGHT
|
||||
enabled: false
|
||||
|
||||
- name: COMMENTED_OUT_CODE
|
||||
enabled: true
|
||||
|
||||
- name: SAY_NO_TO_VAR
|
||||
enabled: true
|
||||
|
||||
- name: UNUSED_IMPORT
|
||||
enabled: true
|
||||
|
||||
- name: CUSTOM_GETTERS_SETTERS
|
||||
enabled: false
|
||||
|
||||
- name: WRONG_INDENTATION
|
||||
enabled: true
|
||||
|
||||
- name: TYPEALIAS_NAME_INCORRECT_CASE
|
||||
enabled: false
|
||||
|
||||
- name: FUNCTION_NAME_INCORRECT_CASE
|
||||
enabled: false
|
||||
|
||||
- name: CONSTANT_UPPERCASE
|
||||
enabled: false
|
||||
|
||||
- name: MISSING_KDOC_TOP_LEVEL
|
||||
enabled: false
|
||||
|
||||
- name: MISSING_KDOC_CLASS_ELEMENTS
|
||||
enabled: false
|
||||
|
||||
- name: MISSING_KDOC_ON_FUNCTION
|
||||
enabled: false
|
|
@ -17,6 +17,7 @@ plugins {
|
|||
id("dev.architectury.loom") version "0.7.2.110" apply false
|
||||
id("com.github.ben-manes.versions") version "0.39.0"
|
||||
id("net.kyori.indra.git") version "2.0.5"
|
||||
id("com.diffplug.spotless") version "5.12.5"
|
||||
id("com.modrinth.minotaur") version "1.2.1"
|
||||
}
|
||||
|
||||
|
@ -161,6 +162,16 @@ allprojects {
|
|||
**/
|
||||
apply(plugin = "java")
|
||||
apply(plugin = "org.jetbrains.kotlin.jvm")
|
||||
apply(plugin = "com.diffplug.spotless")
|
||||
spotless {
|
||||
encoding = Charsets.UTF_8
|
||||
kotlin {
|
||||
ignoreErrorForStep("diktat")
|
||||
diktat("0.6.1").configFile("$rootDir/Formatting.yml")
|
||||
trimTrailingWhitespace(); endWithNewline()
|
||||
}
|
||||
}
|
||||
tasks.spotlessCheck.get().finalizedBy(tasks.spotlessApply)
|
||||
apply(plugin = "architectury-plugin")
|
||||
val compiler = javaToolchains.compilerFor { languageVersion.set(JavaLanguageVersion.of(sourceJavaVer.toInt())) }
|
||||
dependencies {
|
||||
|
|
|
@ -4,6 +4,10 @@ import fr.username404.snowygui.gui.feature.ButtonInfo.Companion.Type
|
|||
import kotlinx.serialization.Serializable
|
||||
import net.minecraft.client.Minecraft
|
||||
|
||||
/**
|
||||
* @property command The command to execute
|
||||
* @property title The title of the macro
|
||||
*/
|
||||
@Serializable
|
||||
@ButtonInfo.Ignored
|
||||
@ButtonInfo(Category.MACROS, kind = Type.CLICK)
|
||||
|
|
Loading…
Reference in New Issue