summaryrefslogtreecommitdiff
path: root/src/tools/pgindent
diff options
context:
space:
mode:
authorAndrew Dunstan2018-06-11 18:47:20 +0000
committerAndrew Dunstan2018-06-11 18:47:20 +0000
commitaf616ce48347c68af7bdcfe0e62d9ad601cb8d75 (patch)
treed1b9fae305d92410b9bde772b365ae3bcc5668ba /src/tools/pgindent
parentbe3d90026a3c17c7e6cc23d52430c37df403d869 (diff)
Add a script to detect perl compile time errors and warnings
Also add a function that centralizes the logic for locating all our perl files and use it in pgperlcritic and pgperltidy as well as the new pgperlcheck.
Diffstat (limited to 'src/tools/pgindent')
-rwxr-xr-xsrc/tools/pgindent/pgperltidy14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/tools/pgindent/pgperltidy b/src/tools/pgindent/pgperltidy
index 5d9aa7c64cd..5e704119eb7 100755
--- a/src/tools/pgindent/pgperltidy
+++ b/src/tools/pgindent/pgperltidy
@@ -7,14 +7,6 @@ set -e
# set this to override default perltidy program:
PERLTIDY=${PERLTIDY:-perltidy}
-# locate all Perl files in the tree
-(
- # take all .pl and .pm files
- find . -type f -a \( -name '*.pl' -o -name '*.pm' \)
- # take executable files that file(1) thinks are perl files
- find . -type f -perm -100 -exec file {} \; |
- egrep -i ':.*perl[0-9]*\>' |
- cut -d: -f1
-) |
-sort -u |
-xargs $PERLTIDY --profile=src/tools/pgindent/perltidyrc
+. src/tools/perlcheck/find_perl_files
+
+find_perl_files | xargs $PERLTIDY --profile=src/tools/pgindent/perltidyrc