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

How to output junit report to a file? #1352

Closed
cawoodm opened this issue Nov 16, 2020 · 2 comments
Closed

How to output junit report to a file? #1352

cawoodm opened this issue Nov 16, 2020 · 2 comments

Comments

@cawoodm
Copy link

cawoodm commented Nov 16, 2020

Sorry for posting this here - I've read all the docs and can't find a solution.

When running eslint via the vue-cli (or directly with npx eslint) using a junit output format there seems to be no option to output to a file. Similar to this issue we need to support a -o parameter.

What doesn't work

In all these cases the output is on stdout instead of to a file:

  • vue-cli-service lint --format junit -o output.xml
  • vue-cli-service lint --format junit --output-file output.xml
  • npx eslint --format junit -o output.xml
  • npx eslint --format junit --output-file output.xml
  • npx eslint --format junit --out output.xml

What sometimes works

Redirecting with > only works if there are errors reported in XML format. If there are no errors the XML contains plain text and is therefore invalid:

  • npx eslint --format junit > output.xml
  • DONE No lint errors found!
  • Done in 24.30s.

Any help would be much appreciated.

@cawoodm
Copy link
Author

cawoodm commented Nov 16, 2020

Seems to be a feature request for the vue-cli:
vuejs/vue-cli#4850

@ota-meshi
Copy link
Member

eslint-plugin-vue doesn't do anything about the output format, so I close this issue. Follow vue-cli issue.

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

No branches or pull requests

2 participants