Skip to content

Instantly share code, notes, and snippets.

@yewton
Created June 11, 2012 04:10
Show Gist options
  • Save yewton/2908486 to your computer and use it in GitHub Desktop.
Save yewton/2908486 to your computer and use it in GitHub Desktop.
myphpmd
#!/usr/bin/perl
use strict;
my $source = $ARGV[0];
my $type = $ARGV[1];
my $rules = $ARGV[2];
my $result = `phpmd ${source} ${type} ${rules}`;
$result =~ s/^\s+//g;
$result =~ s/(:[0-9]+)/$1:/g;
print $result;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment