Exclude files in .git from list of perl files
authorAndrew Dunstan <andrew@dunslane.net>
Tue, 12 Jun 2018 18:54:43 +0000 (14:54 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Tue, 12 Jun 2018 18:54:43 +0000 (14:54 -0400)
The .git directory might contain perl files, as hooks, for example.
Since we have no control over these they should be excluded from things
like our perlcritic checks.

Per offline report from Mike Blackwell.

src/tools/perlcheck/find_perl_files

index e10466a3905bb1d5d4724bad3c790961558ccc6c..d7da9fe85926ab809f65322b35491ec04450f7d7 100644 (file)
@@ -11,5 +11,5 @@ find_perl_files () {
        find . -type f -perm -100 -exec file {} \; -print |
        egrep -i ':.*perl[0-9]*\>' |
        cut -d: -f1
-   } | sort -u
+   } | sort -u | grep -v '^\./\.git/' 
 }