christophsturm
02/01/2021, 5:40 PMmbonnin
02/01/2021, 5:46 PM@Suppress("MemberVisibilityCanBePrivate")
on your test class?wasyl
02/01/2021, 5:46 PMmbonnin
02/01/2021, 5:46 PMchristophsturm
02/01/2021, 5:49 PMchristophsturm
02/01/2021, 5:49 PMchristophsturm
02/01/2021, 5:50 PMwasyl
02/01/2021, 5:51 PMchristophsturm
02/01/2021, 5:52 PMwasyl
02/01/2021, 5:53 PMchristophsturm
02/01/2021, 5:53 PMwasyl
02/01/2021, 5:54 PMcan i configure that in ktlint?You’d have to define test roots somehow. So I’d guess you could take
/test/
directory under consideration, but it might not be 100% consistent with what you configure in Gradle, like if you add another test source directorychristophsturm
02/01/2021, 5:54 PMchristophsturm
02/01/2021, 5:54 PMwasyl
02/01/2021, 5:55 PMwasyl
02/01/2021, 5:55 PMchristophsturm
02/01/2021, 5:56 PMwasyl
02/01/2021, 5:57 PMprivate
keyword anywhere under src/test/
KtLint should do the job. Maybe you can even configure it to only use custom rules? Not surechristophsturm
02/01/2021, 5:58 PMwasyl
02/01/2021, 5:58 PMchristophsturm
02/01/2021, 5:59 PMwasyl
02/01/2021, 5:59 PMif
vs when
.wasyl
02/01/2021, 6:00 PMand then i just turn off autoformatting and checks in idea? or can i run ktlint via a plugin?🤔 We don’t use many custom rules and our codestyle.xml is consistent with KtLint’s rules. So what we do is run
./gradlew formatKotlin
locally to fix issues, and ./gradlew lintKotlin
on CI. The checks aren’t integrated in IDEchristophsturm
02/01/2021, 6:01 PMchristophsturm
02/01/2021, 6:02 PMwasyl
02/01/2021, 6:02 PMwasyl
02/01/2021, 6:03 PMPsiViewer
pluginchristophsturm
02/01/2021, 6:05 PM