povils / phpmnd

PHP Magic Number Detector
MIT License
554 stars 46 forks source link

Filter out checks for Test files #59

Closed richardhughes closed 7 years ago

richardhughes commented 7 years ago

It would be nice to have a way of passing an argument to the command which allows you to filter out file names with a given string.

For example: My tests are always in the format of ****Test.php and if we could filter out these from the checks it would be good.

I don't think the exclude directory argument would be suitable due to the location of all our test files (Tests are alongside the code).

I'm happy to take a look at this.

Cheers

povils commented 7 years ago

Hey, Thanks for the question :) Sorry, but could you confirm that something like: "vendor/bin/phpmnd src --exclude-file=*Test.php" doesn't work.

Regards

richardhughes commented 7 years ago

Yeah I think that would work, I had a dig around in the Symphony docs and found another solution, I used --exclude-path=Test but i'll try that tomorrow. Thanks, I'll close this for now and comment back tomorrow on whether that works.

richardhughes commented 7 years ago

@povils Yeah that works. Thanks :+1: