Menu

Command line usage for setting explicit value for rule property

Help
Priti
2016-01-16
2016-01-17
  • Priti

    Priti - 2016-01-16

    Is there any way to override a rule property of a ruleset from the command line? For example, if I want to set the Minimum reporting threshold for NPathComplexity, how would I pass that property from the commandline?

    Let's say I want to modify the "minimum" property for ExcessiveMethodLength as well, how can the two be distinguished, since they are both named "minimum"?

    Thanks!

     
  • Andreas Dangel

    Andreas Dangel - 2016-01-17

    Hi,
    the command line options are documented here:
    http://pmd.github.io/pmd-5.4.1/usage/running.html

    Currently it is not possible to specify rule properties on the command line - probably because of the not trivial way to express cases like you mentioned ("minimum").

    You'll need to create a custom ruleset file (http://pmd.github.io/pmd-5.4.1/customizing/howtomakearuleset.html) in which you can reference the rules and set the properties.

    Regards,
    Andreas

     

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.