-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add KtLint baseline support #475
Add KtLint baseline support #475
Conversation
5087f80
to
c06996c
Compare
eb73d0b
to
7460a90
Compare
4286245
to
ed71f90
Compare
plugin/src/main/kotlin/org/jlleitschuh/gradle/ktlint/tasks/GenerateBaselineTask.kt
Show resolved
Hide resolved
*/ | ||
val baseline: RegularFileProperty = objectFactory.fileProperty() | ||
.convention( | ||
projectLayout.projectDirectory.file("ktlintBaseline.xml") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to make the convention having this inside of a directory instead of in the project directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which directory do you have in mind? Something like $projectDir/ktlint/ktlintBaseline.xml
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have changed it to $projectDir/config/ktlint/baseline.xml
This task will generate project baseline file based on all found style issues.
ed71f90
to
d206cf0
Compare
It is constantly failing on Github Windows Agent, while working locally on another windows installation. It is ok just to check it on Linux OS.
aa03c10
to
edc6f92
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -14,6 +16,7 @@ class UnsupportedGradleTest : AbstractPluginTest() { | |||
.withGradleVersion("5.6.4") | |||
|
|||
@Test | |||
@DisabledOnOs(OS.WINDOWS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's up here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gradle test daemon disappearing on Github Windows runner. I've tried to reproduce it on another windows installation, but test there is passing successfully.
And actually it is ok to run this test only on Linux runner.
This PR adds initial KtLint baseline support with following limitations:
Reporter
interface to generate baseline file. Theoretically it will be possible to introduce special generate task in the root project that will trigger all subprojects, collects all errors and then write one baseline file, but let us see how big demand for it will be.Fixes #414