I'm new to using PHP Mess Detector (PHPMD) and want to teak some of the parameters. For example, the naming rules are giving me output like this:

"Avoid variables with short names like $id. Configured minimum length is 3."

Can I change the "configured minimum length" without copying and altering the XML ruleset file?

The message suggests to me that the user of this ruleset can configure these boundaries, and in the Naming Rules docs are "properties" summaries for each method with a "default value".

Can I specify properties on the command line, or is there a general config file somewhere?

有帮助吗?

解决方案

I'm afraid you will have to copy and alter the ruleset file. PHPMD does not support clanging properties on the command line.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top