diff --git a/.editorconfig b/.editorconfig index 6c98409..8527b5f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,11 +1,14 @@ [*.{kt,kts}] +ktlint_code_style=intellij_idea indent_size=2 continuation_indent_size=2 -insert_final_newline=true ij_kotlin_allow_trailing_comma=true ij_kotlin_allow_trailing_comma_on_call_site=true +insert_final_newline=true ktlint_standard_annotation=disabled -ktlint_standard_argument-list-wrapping=disabled -ktlint_standard_spacing-between-declarations-with-annotations=disabled +ktlint_standard_max-line-length=disabled ktlint_standard_filename=disabled -ktlint_standard_property-naming=disabled +ktlint_standard_discouraged-comment-location=disabled +ktlint_standard_class-signature=disabled +ktlint_standard_spacing-between-declarations-with-annotations=disabled +ktlint_experimental=enabled \ No newline at end of file diff --git a/build.gradle b/build.gradle index b62d8b0..1b72b7d 100755 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ buildscript { dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" - classpath 'com.vanniktech:gradle-code-quality-tools-plugin:0.23.0' + classpath 'com.vanniktech:gradle-code-quality-tools-plugin:0.24.0' classpath 'com.vanniktech:gradle-maven-publish-plugin:0.25.3' } } @@ -30,7 +30,7 @@ validatePlugins { codeQualityTools { ktlint { - toolVersion = '0.50.0' + toolVersion = '1.0.1' } detekt { enabled = false diff --git a/src/main/kotlin/com/vanniktech/code/quality/tools/DetektCheckTask.kt b/src/main/kotlin/com/vanniktech/code/quality/tools/DetektCheckTask.kt index 6da684d..8af2b4f 100644 --- a/src/main/kotlin/com/vanniktech/code/quality/tools/DetektCheckTask.kt +++ b/src/main/kotlin/com/vanniktech/code/quality/tools/DetektCheckTask.kt @@ -103,8 +103,10 @@ internal abstract class DetektWorker @Inject internal constructor( task.mainClass.set("io.gitlab.arturbosch.detekt.cli.Main") task.classpath = parameters.classpath task.args( - "--input", parameters.inputFile.get().asFile, - reportKey, reportValue, + "--input", + parameters.inputFile.get().asFile, + reportKey, + reportValue, ) val configFile = parameters.configFile.asFile.get() diff --git a/src/test/kotlin/com/vanniktech/code/quality/tools/utils.kt b/src/test/kotlin/com/vanniktech/code/quality/tools/utils.kt index 4be5776..5292187 100644 --- a/src/test/kotlin/com/vanniktech/code/quality/tools/utils.kt +++ b/src/test/kotlin/com/vanniktech/code/quality/tools/utils.kt @@ -13,12 +13,11 @@ import org.gradle.internal.reflect.Instantiator fun defaultExtensions(): CodeQualityToolsPluginExtension { // This is not ideal but the only solution I have found that somewhat works. return CodeQualityToolsPluginExtension( - InstantiatorBackedObjectFactory(object : Instantiator { - @Suppress("DEPRECATION") - override fun newInstance(type: Class, vararg parameters: Any?): T { - return type.newInstance() - } - }, + InstantiatorBackedObjectFactory( + object : Instantiator { + @Suppress("DEPRECATION") + override fun newInstance(type: Class, vararg parameters: Any?): T = type.newInstance() + }, ), ) }