Hi all,just wanted to bring this back in mind in case there are people interested in helping out with this.
Every support is well appreciated, thank you! Regards, Michael Brohl ecomify GmbH www.ecomify.de Am 13.12.16 um 18:35 schrieb Jacopo Cappellato:
Hi all, thanks to Gradle we have now an easy way to run source code analysis tools on our codebase. Tools like PMD and FindBugs generate useful reports containing pointers to code that may need to be improved or fixed. In fact I have executed them on trunk and I got reports with thousands of "rule violations": some of them are probably false positives but others really represent code that can be improved, simplified or, in some cases, fixed. I think that it would be great if this community will work together to fix as many defects as possible: it may lead to a cleaner codebase, may increase the confidence of potential adopters that use these tools to get some insight on our code quality, and may make it easier for new contributors to help the project. So here are the steps to quickly start the process: 1) get a clean checkout of the trunk svn co http://svn.apache.org/repos/asf/ofbiz/trunk 2) edit the build.gradle file to enable the PMD or FindBugs plugins. For PMD you can add the following line to the file, after the other "apply plugin" commands: apply plugin: 'pmd' For FindBugs add the following lines: apply plugin: 'findbugs' tasks.withType(FindBugs) { reports { xml.enabled false html.enabled true } } Apply only pmd or findbugs, not both: the two tools provide different analysis with plenty of defects but the two tools will spot the same ones in most cases, so please choose the tool of your preference and then start fixing the code. 3) run the analysis with the command: ./gradlew check 4) review the report; for PMD the report is: build/reports/pmd/main.html for FindBugs the report is: build/reports/findbugs/main.html 5) fix some bugs and test; then go back to #3 6) create a patch and submit it to Jira, mentioning that it fixes defects reported by PMD/FindBugs Feel free to ask here any question! Jacopo
smime.p7s
Description: S/MIME Cryptographic Signature