diff --git a/.editorconfig b/.editorconfig index d781e8ef4800..54e4945de5a2 100644 --- a/.editorconfig +++ b/.editorconfig @@ -25,6 +25,7 @@ ij_java_names_count_to_use_import_on_demand = 2147483647 ij_java_class_count_to_use_import_on_demand = 2147483647 ij_java_packages_to_use_import_on_demand = 2147483647 +# Kotlin Files [*.kt] ktlint_code_style = intellij_idea @@ -59,3 +60,9 @@ ktlint_standard_final-newline = disabled ktlint_standard_no-wildcard-imports = enabled ktlint_standard_function-expression-body = disabled + +# Additional Kotlin-specific formatting for conditions and continuation +ij_kotlin_continuation_indent_size = 8 +ij_kotlin_binary_expression_wrap = if_long +ij_kotlin_keep_line_breaks = true +ij_kotlin_annotations_new_line_after_suppress = true diff --git a/detekt/detekt.yml b/detekt/detekt.yml index 038f970410ab..374d87e691bd 100644 --- a/detekt/detekt.yml +++ b/detekt/detekt.yml @@ -1,4 +1,3 @@ - config: validation: true @@ -24,7 +23,6 @@ ImportRules: CustomImportOrdering: active: true - style: MagicNumber: # I, Linnea Gräf, of sound mind and body, disagree with disabling this rule active: false diff --git a/src/main/java/at/hannibal2/skyhanni/data/BossbarData.kt b/src/main/java/at/hannibal2/skyhanni/data/BossbarData.kt index 288c3cf50932..b59d5f49fbc8 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/BossbarData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/BossbarData.kt @@ -25,11 +25,12 @@ object BossbarData { bossbar = null } - @SubscribeEvent //#if MC < 1.12 + @SubscribeEvent fun onTick(event: LorenzTickEvent) { val bossbarLine = BossStatus.bossName ?: return //#else + //$$ @SubscribeEvent //$$ fun onRenderGameOverlay(event: RenderGameOverlayEvent.BossInfo) { //$$ val bossbarLine = event.bossInfo.name.formattedText //#endif