-
Notifications
You must be signed in to change notification settings - Fork 460
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 reporter arguments #347
Comments
Here's the code for anyone who wants to contribute a PR: https://github.com/diffplug/spotless/blob/b38ee5a7b9f47bfe6a38749a19d09a751044b6eb/lib/src/main/java/com/diffplug/spotless/kotlin/KtLintStep.java |
Thanks @nedtwigg for the quick reply. I am traveling this week but if no one volunteers by the time I get back I will take a stab at it. Thanks |
Closing due to inactivity, happy to reopen on request. |
@nedtwigg any updates here? I want to get the ktlint reports to pass it to other tool. |
No changes. Happy to take a PR for this feature, but as of now no one has plans to work on this. |
I never did a plugin dev before but I will try my best to make this PR. Thanks! @nedtwigg |
Hi, @nedtwigg after a lot of investigation. KtlintStep uses the KtLint.fromat() internally and access it via reflection. And most of Ktlint useful functionally like reporters are a CLI commands written here. https://github.com/pinterest/ktlint/blob/master/ktlint/src/main/kotlin/com/pinterest/ktlint/Main.kt. I tried to port them to Spotless but that was too much work and felt like writing Ktlint internals again but in Java! |
Spotless is just a
For a JVM tool like So you can absolutely build a ktlint step which calls If the existing |
Now that #1012 has merged, it should be easier to build this if anybody wants to contribute a PR. |
Hi,
I was wondering if it is possible to specify the reporter for ktlint? The
userData
map doesn't seem to send cli args but just editor config args, though I could be misunderstanding.I have tried a few variations:
If this is supported I would appreciate a pointer on how to accomplish this. If it is not I would request a feature enhancement for it.
Thanks!
The text was updated successfully, but these errors were encountered: