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
{{ message }}
Repository navigation
Internal functional interface in Kotlin format in an uncompilable way #1865
If you're just submitting a feature request or question, no need for the above.
When I'm using an internal functional interface, the formatting puts the fun keyword in front of the internal keyword causing the code to be un-compileable.
it's worth mentioning that while creating it I noticed the following:
When setting the project for a single module everything worked fine (as you've mentioned)
When setting it as a multi-module project, where Spotless is applied for each module via the build.gradle.kts in the root the problem re-appears in the example.
It it 100% possible that I'm doing something wrong here and would be happy to hear if this is the case! 🙏
Activity
Goooler commentedon Nov 1, 2023
I can't repro it with Spotless or Ktlint CLI.
Write
DragonSlayingStrategy.ktThen
Nothing changed.
yonatankarp commentedon Nov 1, 2023
I'll create a simple project that reproduce the problem and share it here when it's ready 👍
Add bug example project to repository
Add bug example project to repository
yonatankarp commentedon Nov 2, 2023
Hi @Goooler, here's the repo reproducing the issue I'm facing: https://github.com/yonatankarp/spotless-bug-example
it's worth mentioning that while creating it I noticed the following:
build.gradle.ktsin the root the problem re-appears in the example.It it 100% possible that I'm doing something wrong here and would be happy to hear if this is the case! 🙏
Goooler commentedon Nov 2, 2023
It's something related to
You can try
./gradlew spotlessApplyafter removing this line above.yonatankarp commentedon Nov 2, 2023
Mmmm interesting, I'll try to figure out what are the where's the collision and open an issue for the diktat library 👍
yonatankarp commentedon Nov 3, 2023
Well, after carefully checking the custom config - even after disabling it completely and running it as follows the issue still exists:
diktat("1.2.3")I'll open an issue for them 👍
yonatankarp commentedon Nov 6, 2023
Closing the loop: saveourtool/diktat#1775
I'll close the ticket here once the issue would be solved so there would be no duplication by anyone else 😄
yonatankarp commentedon Dec 21, 2023
The issue can be resolved by using version
1.2.5or above of Diktat. Please look at this example for more info.Closing the issue as the problem was resolved 😄
Goooler commentedon Dec 21, 2023
By the way, you can move to Diktat 2.0 after #1972 is finished.