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

Make reporter option require outputFile option #71

Closed
Tapchicoma opened this issue Aug 4, 2017 · 4 comments
Closed

Make reporter option require outputFile option #71

Tapchicoma opened this issue Aug 4, 2017 · 4 comments

Comments

@Tapchicoma
Copy link
Collaborator

I've tried to introduce new reporter option in the https://github.com/JLLeitschuh/ktlint-gradle plugin and one problem so far - now console output lacks old plain errors when reporter is set to checkstyle or json.

I'd like to have old behaviour for ktlint run output, but introduce new option --outputFile to where reporter will write it output.

@shyiko
Copy link
Collaborator

shyiko commented Aug 4, 2017

@Tapchicoma sounds reasonable.

Instead of introducing another CLI option, how about something like
ktlint --reporter=plain?group_by_file --reporter="checkstyle > target/checkstyle.xml" --reporter="html > target/ktlint.html"?

@Tapchicoma
Copy link
Collaborator Author

Hm. If you don't want to introduce another option then I'd like to have more standard approach for additional command line option arguments:

ktlint --reporter plain?group_by_file --reporter checkstyle=target/checkstyle.xml

or

ktlint --reporter plain?group_by_file --reporter checkstyle,output=target/checkstyle.xml

See getsubopt() documentation for reference.

@shyiko
Copy link
Collaborator

shyiko commented Aug 5, 2017

@Tapchicoma it's not that I don't want to introduce another option, it just --outputFile can potentially make things complicated for multi-format reporting (e.g. checkstyle and html at the same time).
Anyway, I like your 2nd example (ktlint --reporter plain?group_by_file --reporter checkstyle,output=target/checkstyle.xml). I think this is the way to go.
Also, thank you for the link 🙇‍♂️.

@pinterest pinterest deleted a comment Aug 9, 2017
@shyiko
Copy link
Collaborator

shyiko commented Oct 11, 2017

Implemented in 0.10.0.

@shyiko shyiko closed this as completed Oct 11, 2017
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