mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user