Skip to content
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

How to use baseline when the project has multiple modules? #765

Open
Tgo1014 opened this issue Jun 20, 2024 · 1 comment
Open

How to use baseline when the project has multiple modules? #765

Tgo1014 opened this issue Jun 20, 2024 · 1 comment

Comments

@Tgo1014
Copy link

Tgo1014 commented Jun 20, 2024

I've generated the baseline.xmls files using ktlintGenerateBaseline. Then I've added:

subprojects {
  ktlint {
   [...]
   baseline = file("baseline.xml")
   [...]
  }
}

but it gets ignored when I run ktlintFormat.

Is there a way to have a baseline.xml per module and have the ktlintFormat to ignore the issues on the baseline?

@saran-epifi
Copy link

The issue pointed to Readme

- Format tasks ignore baseline. See [#1072](https://github.com/pinterest/ktlint/issues/1072) KtLint issue for more details.

has been resolved. However, using the latest ktlint version with this gradle plugin still formats the errors in the baseline file.

How do we make the format task ignore the errors included in the baseline?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants