Skip to content

Commit

Permalink
Pre-apply ktfmt plugin to the branch
Browse files Browse the repository at this point in the history
  • Loading branch information
rock3r committed Sep 6, 2024
1 parent e4ad6e6 commit 5fdfa41
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 6 deletions.
19 changes: 17 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,25 @@ indent_size = 2
indent_size = 2

[{*.kt,*.kts}]
ktlint_function_signature_body_expression_wrapping = multiline
ktlint_ignore_back_ticked_identifier = true
ij_kotlin_allow_trailing_comma = true
ktlint_function_naming_ignore_when_annotated_with = Composable
ktlint_function_signature_body_expression_wrapping = multiline
ktlint_ignore_back_ticked_identifier = true
ktlint_standard_annotation = disabled
ktlint_standard_chain-method-continuation = disabled
ktlint_standard_class-signature = disabled
ktlint_standard_condition-wrapping = disabled
ktlint_standard_function-expression-body = disabled
ktlint_standard_function-literal = disabled
ktlint_standard_function-signature = disabled
ktlint_standard_import-ordering = disabled
ktlint_standard_indent = disabled
ktlint_standard_multiline-expression-wrapping = disabled
ktlint_standard_parameter-list-wrapping = disabled
ktlint_standard_string-template-indent = disabled
ktlint_standard_trailing-comma-on-call-site = disabled
ktlint_standard_trailing-comma-on-declaration-site = disabled
ktlint_standard_try-catch-finally-spacing = disabled

[gradlew.bat]
end_of_line = crlf
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ local.properties
!.idea/icon.png
!.idea/icon_dark.png
!.idea/inspectionProfiles/
!.idea/ktfmt.xml
!.idea/ktlint.xml
!.idea/ktlint-plugin.xml
!.idea/runConfigurations/
!.idea/scopes/
!.idea/vcs.xml
Expand Down
6 changes: 5 additions & 1 deletion .idea/externalDependencies.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/ktfmt.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/ktlint-plugin.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/Pre_push.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/Reformat_project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/Stand_alone_sample.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies {
implementation(libs.kotlinSarif)
implementation(libs.kotlinpoet)
implementation(libs.kotlinter.gradlePlugin)
implementation(libs.ktfmt.gradlePlugin)
implementation(libs.kotlinx.binaryCompatValidator.gradlePlugin)
implementation(libs.kotlinx.serialization.json)
implementation(libs.poko.gradlePlugin)
Expand Down
9 changes: 9 additions & 0 deletions buildSrc/src/main/kotlin/jewel-linting.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
plugins {
id("io.gitlab.arturbosch.detekt")
id("org.jmailen.kotlinter")
id("com.ncorti.ktfmt.gradle")
}

configurations {
Expand All @@ -14,3 +15,11 @@ configurations {
attributes { attribute(Usage.USAGE_ATTRIBUTE, objects.named("sarif")) }
}
}

ktfmt {
maxWidth = 120
blockIndent = 4
continuationIndent = 4
manageTrailingCommas = true
removeUnusedImports = true
}
3 changes: 3 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ kotlinpoet = "1.17.0"
kotlinterGradlePlugin = "4.3.0"
kotlinxSerialization = "1.6.3"
kotlinxBinaryCompat = "0.14.0"
ktfmtGradlePlugin = "0.20.1"
poko = "0.15.3"

[libraries]
Expand Down Expand Up @@ -40,6 +41,7 @@ kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", ve
kotlinpoet = { module = "com.squareup:kotlinpoet", version.ref = "kotlinpoet" }
kotlinter-gradlePlugin = { module = "org.jmailen.gradle:kotlinter-gradle", version.ref = "kotlinterGradlePlugin" }
kotlinx-binaryCompatValidator-gradlePlugin = { module = "org.jetbrains.kotlinx:binary-compatibility-validator", version.ref = "kotlinxBinaryCompat" }
ktfmt-gradlePlugin = { module = "com.ncorti.ktfmt.gradle:plugin", version.ref = "ktfmtGradlePlugin" }
poko-gradlePlugin = { module = "dev.drewhamilton.poko:poko-gradle-plugin", version.ref = "poko" }

[bundles]
Expand All @@ -54,4 +56,5 @@ kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlinx-binaryCompatValidator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlinxBinaryCompat" }
kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kotlinter = { id = "org.jmailen.kotlinter", version.ref = "kotlinterGradlePlugin" }
ktfmt = { id = "com.ncorti.ktfmt.gradle", version.ref = "ktfmtGradlePlugin" }
poko = { id = "dev.drewhamilton.poko", version.ref = "poko" }

0 comments on commit 5fdfa41

Please sign in to comment.