VSCode PHP Mess Detector
To install the extension: Press
Using the built-in PHPMD PHAR
To use the built-in PHP mess detector you need to have PHP in your PATH. To test, open a shell or command window and type
Using a custom PHPMD PHAR or executable
If you want to customize the default PHP mess detector command, e.g. you have PHP mess detector globally installed through composer or have PHP available on a different location, you can customize the command with the
The following configuration options are available:
Customize the PHP mess detector command. If left empty the built-in PHPMD PHAR archive will be executed and PHP needs to be available on your PATH. If you want to use a different PHPMD PHAR you can customize the command here.
To use PHPMD installed globally with composer on a windows machine set this setting to:
Or to use your own PHPMD PHAR on a custom location:
Customize the PHPMD ruleset files used. This option can also take the path to a custom PHPMD ruleset file. Use VS Code's workspace settings to control the rules or ruleset files per workspace. Refer to PHPMD's documentation for more information on the ruleset parameter.
To use only the cleancode ruleset and skip all the others:
Pass a comma seperated list of rulesets:
Pass the path to a ruleset file:
Turn verbose logging on or off. All log entries can be viewed VS Code's output panel. Generally this can be turned off (default) unless you need to troubleshoot problems.
Loading More data ...