I am trying to generate report using PMD command line tool. My aim is to find out the difference in the violations count after I have changed the code. The intention is to highlight if any new violations have occurred after the previous run of pmd tool.
This is the command I have used for running the pmd tool. It is able to generate report in html format.
./pmd.bat -dir "C:\Source_code_folder\" -cache "C:\temp\temp.txt" -f html -R "C:\Source_code_folder\rules.xml" > C:\temp\temp.html
The expectation is to print delta violations count on screen. One of the ways which I thought was to extract info from the report manually(using script), sum it and echo the result. I'm not aware of any option inbuilt in pmd which does the same.
There is no such functionality in PMD at the moment. There is, however, an issue raised where you might wish to add your input.