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
I want to be able to use ktlint-gradle integration together with the official Ktlint plugin for intelliJ IDEA.
Problems start when I try to also keep the baseline file for both ktlint-gradle and IntelliJ plugin. When I run ktlintGenerateBaseline it generates baseline for submodule (app module in my case for Android). But, IntelliJ plugin expects the baseline generated from the root directory of the project.
I have opened an [issue] (nbadal/ktlint-intellij-plugin#472) in intelliJ plugin repo which describes what is an exact problem in my case.
TLDR: it is about <file name="app/src/ vs <file name="src/
In the documentation I can read that "One baseline file is generated per one Gradle project (module)." My question is, is there a way to generate the baseline file from the root project directory?
I tried to generate a baseline with just ktlint command line from the root project directory and pass that file as baselineconfiguration but that did not work. ktlintCheck still shows all the errors that are in baseline.
I also tried to only apply ktlint-gradle in the root gradle file and then run ktlintGenerateBaseline. And it generated an empty baseline file. (Even if I have some kotlin files in the root directory with some errors it still generates an empty baseline file).
to go back to this "One baseline file is generated per one Gradle project (module)." what does project and model refer to in this statement?
The text was updated successfully, but these errors were encountered:
Hello,
I want to be able to use
ktlint-gradle
integration together with the official Ktlint plugin for intelliJ IDEA.Problems start when I try to also keep the baseline file for both ktlint-gradle and IntelliJ plugin. When I run
ktlintGenerateBaseline
it generates baseline for submodule (app module in my case for Android). But, IntelliJ plugin expects the baseline generated from the root directory of the project.I have opened an [issue] (nbadal/ktlint-intellij-plugin#472) in intelliJ plugin repo which describes what is an exact problem in my case.
TLDR: it is about
<file name="app/src/
vs<file name="src/
In the documentation I can read that "One baseline file is generated per one Gradle project (module)." My question is, is there a way to generate the baseline file from the root project directory?
I tried to generate a baseline with just
ktlint
command line from the root project directory and pass that file asbaseline
configuration but that did not work.ktlintCheck
still shows all the errors that are in baseline.I also tried to only apply
ktlint-gradle
in the root gradle file and then runktlintGenerateBaseline
. And it generated an empty baseline file. (Even if I have some kotlin files in the root directory with some errors it still generates an empty baseline file).to go back to this "One baseline file is generated per one Gradle project (module)." what does project and model refer to in this statement?
The text was updated successfully, but these errors were encountered: