This linter plugin for Linter provides an interface to phpmd. It will be used with files that have the “PHP” syntax or PHP embedded within HTML.
Before installing this plugin, you must ensure that phpmd
is installed on your system. To install phpmd
, do the following:
pear channel-discover pear.phpmd.org
pear channel-discover pear.pdepend.org
pear install --alldeps phpmd/PHP_PMD
After verifying that phpmd
works from your terminal, proceed to install the linter-phpmd plugin.
$ apm install linter-phpmd
You can configure linter-phpmd by editing ~/.atom/config.cson (choose Open Your Config in Atom menu):
'linter-phpmd':
'executablePath': null #phpmd path. run `which phpmd` to find the path
'rulesets': 'cleancode,codesize,controversial,design,naming,unusedcode' #phpmd rulesets
If you would like to contribute enhancements or fixes, please do the following:
- Fork the plugin repository.
- Hack on a separate topic branch created from the latest
master
. - Commit and push the topic branch.
- Make a pull request.
- Welcome to the club!
Please note that modifications should follow these coding guidelines:
- Indent is 2 spaces.
- Code should pass CoffeeLint with the provided
coffeelint.json
. - Vertical whitespace helps readability, don’t be afraid to use it.
Thank you for helping out!