Skip to content

Guard::PHPMD automatically runs PHP Mess Detector when watched files are modified

License

Notifications You must be signed in to change notification settings

EricHogue/guard-phpmd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

  • :executable # default => "phpmd"

Specify the path to the phpmd executable. Useful when installing phpmd with Composer.

Example

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

About

Guard::PHPMD automatically runs PHP Mess Detector when watched files are modified

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%