Guard::PHPMD automatically runs PHP Mess Detector when watched files are modified
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/guard
.gitignore
Gemfile
LICENSE
README.md
Rakefile
guard-phpmd.gemspec

README.md

Guard::PHPMD

This guard will run PHP Mess Detector for you automatically when files are modified.

Install

Make sure you have guard and phpmd installed.

Install the gem with:

gem install guard-phpmd

Or add it to your Gemfile:

gem 'guard-phpmd'

And then add a basic setup to your Guardfile:

guard init phpmd

Options

  • :path # default => "."

Set the working directory (useful when using relative paths used in the rules file)

  • :rules # default => "pmd-rules.xml"

Path to the rules file.

Example

guard 'phpmd', :path => 'path/to/PHPMD', :rules => 'path/to/pmd-rules.xml' do
    watch(%r{.*\.php$})
end