-
Notifications
You must be signed in to change notification settings - Fork 2
Ktlint upgrade #42
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
Ktlint upgrade #42
Conversation
| classpath = execKtlintClasspath | ||
| mainClass.set("com.pinterest.ktlint.Main") | ||
| args = lintPaths | ||
| jvmArgs("--add-opens", "java.base/java.lang=ALL-UNNAMED") |
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.
question: why remove the jvm args just for ktlint?
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.
Just following the guide on ktlint docs: https://pinterest.github.io/ktlint/latest/install/integrations/#custom-gradle-integration-with-kotlin-dsl
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.
I would lean towards keeping it since we don't know if it was necessary but I don't feel strongly about it. A good way to test this would be to run ktlint twice, once with and once without
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.
Sorry, just saw this comment after I already merged the PR. I had already tested with and without the jvmArgs locally, there was no difference. In general I think we should trust our dependencies' onboarding guides and if they end up being incorrect, send them a PR to fix the documentation.
| mainClass.set("com.pinterest.ktlint.Main") | ||
| args = listOf("-F") + lintPaths | ||
| jvmArgs("--add-opens", "java.base/java.lang=ALL-UNNAMED") | ||
| jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED") |
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.
nit/style: the same change could be made in CodeStyle.kt
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.