publint icon indicating copy to clipboard operation
publint copied to clipboard

Support junit output

Open simonihmig opened this issue 6 months ago • 3 comments

Would be nice to have an option to emit a junit file from the CLI. Would help running this tool on multiple packages in a monorepo, as CI could properly show any failures to the user, rather than having to search through log files.

If you are open to the idea, I could work on a PR!

simonihmig avatar Jun 18 '25 19:06 simonihmig

Sounds good to me if the implementation isn't too complex. Maybe it can be a new --output junit flag, and the current one can be --output human or something. Similar to eslint (which used to have junit in v8).

bluwy avatar Jun 20 '25 04:06 bluwy

Yeah, I don't think this should get very complex. Some simple abstraction over the concept of "reporters" would be useful though I think.

Before digging into that, I think having https://github.com/publint/publint/issues/170 would be extremely helpful here, to first refactor the code to introduce reporters without regressions and then add some tests for the to-be-introduced junit reporter.

Are you working on this already by any chance or planning to do so?

simonihmig avatar Jun 20 '25 08:06 simonihmig

I have not started on that but that sounds like a good idea too. Feel free to work on the reporter abstraction first 👍

bluwy avatar Jun 22 '25 16:06 bluwy