question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Baseline file not created

See original GitHub issue

Using v10.1.0.

I have an Android project with many modules. In the main project build script we have the following:

subprojects {
    apply plugin: 'org.jlleitschuh.gradle.ktlint'

    // Global ktlint config
    ktlint {
        enableExperimentalRules.set(true)
        baseline.set(file("my-project-ktlint-baseline.xml"))
        outputColorName = "RED"
        outputToConsole = true
        verbose = true
        reporters {
            reporter "checkstyle"
        }
        filter {
            // Exclude generated files
            exclude("**/build/**")
            exclude("**/KtAnalyticsEvents.kt")
        }
    }
}

When I run the ktlintCheck task, the baseline file is not created.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
Tapchicomacommented, Jun 3, 2021

Baseline is generated using special task - ktlintGenerateBaseline. Will add it to project readme.

0reactions
Tapchicomacommented, Jun 15, 2021

Yes, make sense to not generate baseline file if there are no lint errors present.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Should the Baseline task generate a baseline file when no ...
Personally I think it should not, because the mere existance of a baseline file - even if empty - suggests that it is...
Read more >
Analyzing the baseline file - IBM
In a real baseline file (such as the tmroid.xml file that you created in the previous step), this information is automatically supplied by...
Read more >
android lintoptions with baseline file is not working
I have a project which has few lint warnings. For newly created changes if there are any lint warnings I want the build...
Read more >
Create or update a baseline or an interim plan in Project desktop
If you need to keep records of extensive project data during the planning phase, it is a good idea to set multiple baselines...
Read more >
Code Smell Baseline | Detekt
This will create one baseline file per Gradle module. As this might not be the desired behavior for a multi module project, think...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found