You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ktlint experimental rules are supported since #1168 .
While configuration is available, neither it nor the right .editorconfig entry seem to have any effect.
$ ktlint
10:29:33.192 [main] INFO com.pinterest.ktlint.internal.KtlintCommandLine - Enable default patterns [**/*.kt, **/*.kts]
[...]/bug-spotless-ktlint-experimental-rules/src/main/kotlin/Test.kt:1:5: Property name should use the screaming snake case notation when the value can not be changed (cannot be auto-corrected) (experimental:property-naming)
Summary error count (descending) by rule:
experimental:property-naming: 2
summary of problem
gradle or maven version: 8.0.2 or 7.6
spotless version: 6.17.0
operating system and version: OS X 13.2.1
copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible
copy-paste the full content of any console errors emitted by gradlew spotless[Apply/Check] --stacktrace
The text was updated successfully, but these errors were encountered:
dhoepelman
changed the title
Ktlint experimental rules are never applied
Ktlint experimental rules are never applied in gradle plugin
Mar 23, 2023
Another thing from the 0.48.2 release notes it seems that ktlint want to discourage config like setUseExperimental and let .editorconfig be the source of truth.
ktlint
experimental rules are supported since #1168 .While configuration is available, neither it nor the right
.editorconfig
entry seem to have any effect.A repository showing a minimal reproducing example of the problem can be found here.
Given this config:
(I also tried some variations of the above, but it doesn't matter)
and a file
Test.kt
:Running
./gradlew spotlessCheck --stacktrace
will be successful:$ ./gradlew spotlessCheck --stacktrace BUILD SUCCESSFUL in 403ms 3 actionable tasks: 2 executed, 1 up-to-date
while
ktlint
fails:gradlew spotless[Apply/Check] --stacktrace
The text was updated successfully, but these errors were encountered: