astj / flake8-formatter-junit-xml

JUnit XML formatter for flake8
MIT License
17 stars 10 forks source link

Screen Display and File Output #10

Open cancan101 opened 6 years ago

cancan101 commented 6 years ago

Is there any way with this plugin to output both to a file (using the formatter) and the screen using the default formatting? The --tee option outputs to both file and screen however xml is written to the screen.

astj commented 6 years ago

Currently no. But once I tried (and perfectly forgot about it), so I'll check and consider it agin.

rubber-ant commented 3 years ago

Any update on this ?

ojdo commented 3 years ago

I first thought that I had the same request, having added format = junit-xml to my project's setup.cfg. But then I realised that this option could instead just be added when calling it within my CI server's context, so I moved it to (in my case) the invocation within a .gitlab-ci.yml file:

    script:
    - flake8 --format junit-xml > flake8-report.xml

In the terminal, flake8 remains default format, CI gets nice test reports.

devmcp commented 1 year ago

+1 for this. I'd like to be able to write to an xml file and print the Default content to screen