Skip to content

Commit

Permalink
Refrain from running spotless on weblate files
Browse files Browse the repository at this point in the history
Those are akin to generated files and are likely to not follow our formatting
  • Loading branch information
AntsyLich committed Oct 13, 2024
1 parent 4051f18 commit 32d2c2a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion buildSrc/src/main/kotlin/mihon.code.lint.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ plugins {

val libs = the<LibrariesForLibs>()

val xmlFormatExclude = buildList(2) {
add("**/build/**/*.xml")

projectDir
.resolve("src/commonMain/moko-resources")
.takeIf { it.isDirectory }
?.let(::fileTree)
?.matching { exclude("/base/**") }
?.let(::add)
}
.toTypedArray()

spotless {
kotlin {
target("**/*.kt", "**/*.kts")
Expand All @@ -23,7 +35,7 @@ spotless {
}
format("xml") {
target("**/*.xml")
targetExclude("**/build/**/*.xml")
targetExclude(*xmlFormatExclude)
trimTrailingWhitespace()
endWithNewline()
}
Expand Down

0 comments on commit 32d2c2a

Please sign in to comment.