-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Allow to produce a text/xml/json/... report of the failures for better CI integration #134
Comments
I think it should be easy to optionally allow to write the reports to a separate file. The main thing to discuss: Type of output - structured file? Other question: How do you handle compilation errors /javadoc errors? They have same problem! |
ad format: yes, some structure that can be post-processed, txt, xml or json would be fine ad compile errors: Yes, similar problem, some CI systems at least apply different formatting/red font in the console output. And at least for us, devs are much less prone to send it off to CI when it does not even compile, but forbidden-api is sometimes turned off locally in order to speed up local builds. For Javadoc there are some Jenkins/CI plugins, e.g. the "JavaDoc Warnings" entry at https://builds.apache.org/view/P/view/POI/job/POI-DSL-1.8/297/ |
I'd keep the logging output as is, but just create a file (like the JUnit report files). Do you know a good format to use? How do other tools report their errors? It would be good to have a "standard format". |
Yes, sure, still having the log-output is expected. As format, I don't think there is a standard, the findbugs results are likely quite similar in what info the results contain, maybe we can follow that one so you can use the existing CI tooling for findbugs? It's XML as far as I know. |
This one?: https://gleclaire.github.io/findbugs-maven-plugin/examples/findbugs.xml Looks easily produceable... Needs some refactoring of log writer but not complicated. Once I have a architecture for the failures, it should be easy to add more custom formats. In the maven plugin you could generate it as report output, for gradle i have no idea where reports are generated. I will dive into it. |
Here is an example/comparison of the files generated by PMD/Checkstyle/Findbugs: Blog by SOFTWARE ENGINEERING CANDIES |
I started working on this issue, see https://github.com/burberius/forbidden-apis/tree/feature/134-xml-report |
We have a large Gradle based build which uses "--parallel" heavily to speed up compilation of commits.
Because of this, the output of the forbidden-api plugin is often hidden in some other build-output which makes it hard to find the actual fail reasons buried in many unrelated lines from multiple different projects that were built in parallel.
For this it would be very useful to have an option so that the results are also written to some result-file. This file could then be post-processed by CI servers and visualized on the landing page of the broken build, similar to junit-test-failures and other fail-reasons.
If the main bits of information can be extracted by downstream systems easily, it would make it much easier to integrate forbidden-api-checks in large CI setups.
The text was updated successfully, but these errors were encountered: