Scroll to navigation

PHPMD(1) User Commands PHPMD(1)


PHPMD - PHPMD command line interface


Mandatory arguments: 1) A php source code filename or directory. Can be a comma-separated string 2) A report format 3) A ruleset filename or a comma-separated string of rulesetfilenames

Example: phpmd /path/to/source format ruleset

Available formats: ansi, html, json, text, xml. Available rulesets: .

Optional arguments that may be put after the mandatory arguments: --minimumpriority: rule priority threshold; rules with lower priority than this will not be used --reportfile: send report output to a file; default to STDOUT --suffixes: comma-separated string of valid source code filename extensions, e.g. php,phtml --exclude: comma-separated string of patterns that are used to ignore directories --strict: also report those nodes with a @SuppressWarnings annotation --ignore-violations-on-exit: will exit with a zero code, even if any violations are found

December 2019 PHPMD 2.8.0~beta2