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

Add JUnit formatter #7303

Closed
jpserra opened this issue Aug 21, 2019 · 8 comments
Closed

Add JUnit formatter #7303

jpserra opened this issue Aug 21, 2019 · 8 comments
Labels
feature request stale Issues that haven't been active in a while

Comments

@jpserra
Copy link

jpserra commented Aug 21, 2019

Some CI tools expect test results to be formatted as JUnit XML. It would be interesting to support this for rubocop Cop results so we can add a step in the pipeline to check for rubocop offenses.

Solution

Include a JUnit formatter in rubocop

@buehmann
Copy link
Contributor

What would be an example of such a CI tool?

@jpserra
Copy link
Author

jpserra commented Aug 22, 2019 via email

@thomthom
Copy link
Contributor

@rrosenblum
Copy link
Contributor

There is a rubocop-junit-formatter gem that can be used until we add the formatter into core RuboCop. I've never used the gem, but it should work. It will also give us a good baseline for how to implement the formatter.

@jpserra
Copy link
Author

jpserra commented Sep 12, 2019 via email

@rrosenblum
Copy link
Contributor

Thanks for confirming that the gem does work. I agree that this looks like something that can and should be supported by RuboCop itself. The junit formatter is a commonly accepted format.

It looks like we would not want to take the implementation directly from the gem. There are several reports of the issues where the formatter is slow or misses some offenses. There is a PR that aimed to fix this, but it was never merged in. Still better to have a starting place than nothing at all.

@stale
Copy link

stale bot commented Mar 11, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!

@stale stale bot added the stale Issues that haven't been active in a while label Mar 11, 2020
@koic
Copy link
Member

koic commented Mar 11, 2020

This issue has been closed by #7701.

@koic koic closed this as completed Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request stale Issues that haven't been active in a while
Projects
None yet
Development

No branches or pull requests

6 participants