how to exclude test file for diktat plugin, but enabling it for ktlint plugin. #2339
Replies: 1 comment 1 reply
-
On GitHub, use triple-backticks for multi-line code blocks (I edited your question above). The If you want, you can do this:
but it's kinda icky. I don't recommend having any files get formatted by two different formats. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi team,
I'm using the spotless plugin in my gradle kotlin project. I have used the ktlint and diktat from the spotless.
I have a situation where I need to avoid running the diktat for test files , but run only for src files.
But for ktlint, it has to run on both src and test files.
I have made the below configuration in my build.gradle.kts , but seems like both ktlint & diktat is not happening for test files.
(I want only ktlint to run for the test files)
WE can clearly see that I have a targetExclude just for diktat().
Can anyone help me here please ? Am I missing something ?
Beta Was this translation helpful? Give feedback.
All reactions