Menu

#1414 Command line parameter to disable "failOnViolation" behavior

PMD-5.4.0
closed
None
PMD
3-Major
Feature-Request
2015-09-26
2015-09-24
NoRulez
No

It would be nice to have a command line option "--exit-with-success" or similar which exits with return code 0 instead of 4, so that other tools which only checks "exitcode != 0" also succeeds

Discussion

  • Andreas Dangel

    Andreas Dangel - 2015-09-26

    Currently PMD command line has the following exit codes:

    0Everything is fine, now violations found
    1Couldn't understand command line parameters or PMD exited with an exception
    4At least one violation has been detected

    4 means, the PMD check was not successful - and hence it returns 4 instead of 0....

    I guess, you would like to have an option like doNotFailOnViolation or ignoreViolations that would just write the report, but don't fail the build.

    Is this correct?

     
  • Andreas Dangel

    Andreas Dangel - 2015-09-26
    • summary: Exitcode for successful runs --> Command line parameter to disable "failOnViolation" behavior
    • status: open --> in-progress
    • assigned_to: Andreas Dangel
    • Milestone: New Tickets --> PMD-5.4.0
     
  • Andreas Dangel

    Andreas Dangel - 2015-09-26

    I'll add for PMD 5.4.0 a new option, that can disable this behavior:

    Executing PMD as

    ./run.sh pmd -d src -f text -R java-basic -failOnViolation false
    

    will execute the checks and write the report but exit with status code 0 instead of 4.

     
  • Andreas Dangel

    Andreas Dangel - 2015-09-26
    • status: in-progress --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.