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

[Fix #7733] Fix rubocop-junit-formatter imcompatibility XML #7781

Merged

Conversation

koic
Copy link
Member

@koic koic commented Mar 6, 2020

Summary

Fixes #7733.

This PR fixes rubocop-junit-formatter imcompatibility XML for JUnit formatter

The original rubocop-junit-formatter displayed all cops with or without offenses.
https://github.com/mikian/rubocop-junit-formatter/blob/v0.1.4/lib/rubocop/formatter/junit_formatter.rb#L9

It then displays all cops in XML elements, like the original rubocop-junit-formatter.

Other Information

In the future, it would be preferable to display only enabled cops.
https://github.com/mikian/rubocop-junit-formatter/blob/v0.1.4/lib/rubocop/formatter/junit_formatter.rb#L7-L8


Before submitting the PR make sure the following are checked:

  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

## Summary

Fixes rubocop#7733.

This PR fixes rubocop-junit-formatter imcompatibility XML for JUnit formatter

The original rubocop-junit-formatter displayed all cops with or without offenses.
https://github.com/mikian/rubocop-junit-formatter/blob/v0.1.4/lib/rubocop/formatter/junit_formatter.rb#L9

It then displays all cops in XML elements, like the original rubocop-junit-formatter.

## Other Information

In the future, it would be preferable to display only enabled cops.
https://github.com/mikian/rubocop-junit-formatter/blob/v0.1.4/lib/rubocop/formatter/junit_formatter.rb#L7-L8
@koic koic force-pushed the fix_unexpected_result_xml_for_junit_formatter branch from a462ba0 to 58f9cd4 Compare March 7, 2020 07:19
@bbatsov bbatsov merged commit a07363d into rubocop:master Mar 7, 2020
@bbatsov
Copy link
Collaborator

bbatsov commented Mar 7, 2020

Thanks!

@koic koic deleted the fix_unexpected_result_xml_for_junit_formatter branch March 7, 2020 23:21
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

Successfully merging this pull request may close these issues.

JUnit Parses generating empty file [CirlceCI]
2 participants