Hi everyone, I can't seem to use detekt and ktlint...
# detekt
r
Hi everyone, I can't seem to use detekt and ktlint together in the same project. After formatting the project with ktlint, detekt is throwing so many violations especially when it comes to indentation. I am using the default detekt configuration.
b
That's odd. I use those two together all the time without any issue. Are you using the formatting rule set? If you are using ktlint from somewhere else you shouldn't use that rule set
r
Yes I am using the formatting ruleset
b
If you use ktlint directly you don't need formatting. That should fix your issues.
r
After formatting with ktlint, detekt throws indentation errors
I'm not using the detekt format
m
If you use ktlint directly, you should disable the formatting ruleset.
b
And if that rule is not there, just disable that rule that fails
r
Thanks, I had to disable the autocorrect feature of detekt even after removing the rules