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

JUnit Parses generating empty file [CirlceCI] #7733

Closed
coding-bunny opened this issue Feb 19, 2020 · 1 comment · Fixed by #7781
Closed

JUnit Parses generating empty file [CirlceCI] #7733

coding-bunny opened this issue Feb 19, 2020 · 1 comment · Fixed by #7781
Assignees
Labels

Comments

@coding-bunny
Copy link

coding-bunny commented Feb 19, 2020

RuboCop 0.80.0 is not generating the correct file output with the new JUnit formatter.


Expected behavior

I expected the generated files for RuboCop JUnit to contain at least an entry to allows me to report back to CircleCI the amount of files inspected and no offenses found

Actual behavior

Right now the JUnit report is empty, and CircleCI doesn't accept it as a valid test-result report.

Steps to reproduce the problem

Run RuboCop with the following configuration:

bundle exec rubocop --format junit --out tmp/test-results/rubocop/results.xml

This products an empty XML file:

<?xml version='1.0'?>
<testsuites>
  <testsuite name='rubocop'/>
</testsuites>

RuboCop version

0.80.0

$ [bundle exec] rubocop -V
0.80.0 (using Parser 2.7.0.2, running on ruby 2.6.5 x86_64-darwin19)
@coding-bunny
Copy link
Author

coding-bunny commented Feb 19, 2020

image

As example

@bbatsov bbatsov added the bug label Feb 19, 2020
koic added a commit to koic/rubocop that referenced this issue Mar 6, 2020
## 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 added a commit to koic/rubocop that referenced this issue Mar 6, 2020
## 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 added a commit to koic/rubocop that referenced this issue Mar 7, 2020
## 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
bbatsov pushed a commit that referenced this issue Mar 7, 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
ty-porter pushed a commit to ty-porter/rubocop that referenced this issue Mar 21, 2020
## 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
Neodelf pushed a commit to Neodelf/rubocop that referenced this issue Apr 28, 2020
## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants