Ktlint: HTML Reporter

Created on 23 Apr 2019  路  16Comments  路  Source: pinterest/ktlint

Hey, it would be nice to have an HTML reporter.

Until now I've used https://github.com/mcassiano/ktlint-html-reporter, but with the new release 0.32.0 its broken, maybe because of the package rename.

It would be nice to integrate the HTML inside ktlint, to prevent future issues like this one.

proposal

All 16 comments

I have the same issue, simply updating ktlint from v0.31 to v0.32 breaks the build, because the HTML reporter is not found. HTML reporter v0.1.2.

Error: reporter "html" wasn't found (available: checkstyle,json,plain).

I don't have a really strong opinion about whether we merge the HTML reporter into the main line. but you could also submit a pr on the HTML reporter project to update it for the new package namespaces.

I already did, and it was merged but the new version with the fix wasn't released yet.
https://github.com/mcassiano/ktlint-html-reporter/pull/14
I would like to merge the plugin into the main repo to avoid future issues.

If you would be willing to accept PR with this, I could try to create one.

@4brunu would this be a new HTML reporter or actually copying https://github.com/mcassiano/ktlint-html-reporter/ into this codebase?

I'm not sure.

Not sure if it helps but the author of ktlint-html-reporter is ok with the idea of merging it in this project.
https://github.com/mcassiano/ktlint-html-reporter/issues/13#issuecomment-489150461

Hi @shashachu! Are you still interested in moving with copying the reporter directly into ktlint's source? This could fix https://github.com/mcassiano/ktlint-html-reporter/issues/19. I'm not actively using the reporter anymore but I can help with this "migration". I can make any changes to the licensing if needed.

Greetings! Just curious @shashachu @4brunu is the migration of @mcassiano鈥檚 library still a possibility?

Thank you

@arrmixer I think so.
I think the only problem was licensing.
If @mcassiano can change the licensing, I think it won't be difficult to make a PR and merge the html reporter here.
@mcassiano can you please change the license of your plugin?
Thanks

This could fix https://github.com/mcassiano/ktlint-html-reporter/issues/19. I'm not actively using the reporter anymore but I can help with this "migration". I can make any changes to the licensing if needed.

As it was suggested in the issue, this reporter could be either used via local jar or added via build system (Gradle, Maven or any other). Ktlint had built-in dependency resolver, that is not supported anymore and has security issues. Updating it and maintaining it increases complexity of this project.

Html reporter PR was merged and should be available in the next release with other reporters.

@Tapchicoma How to use that html reporter, tried --reporter=html,output=build/reports/ktlint.html but getting Error: reporter "html" wasn't found (available: checkstyle,json,plain)

@iamMehedi what version are you using. I think it was added in version 0.36.0.

worked on 0.36.0, thanks @arrmixer

Was this page helpful?
0 / 5 - 0 ratings