Created
July 4, 2018 20:20
-
-
Save gimler/12abdcda96b24995986be48ced70dcac to your computer and use it in GitHub Desktop.
Simple bash script to find files where the class name not match the file name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find tests -name '*Test.php' -exec sh -c 'FILEPATH={}; FILE=${FILEPATH##*/}; FILEBASE=${FILE%.php}; if ! grep -q $FILEBASE $FILEPATH; then echo $FILEPATH \($FILEBASE\); fi' \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment