File tree Expand file tree Collapse file tree 4 files changed +37
-22
lines changed Expand file tree Collapse file tree 4 files changed +37
-22
lines changed Original file line number Diff line number Diff line change 1+
2+ # src/tools/perlcheck/find_perl_files
3+
4+ # shell function to find all perl files in the source tree
5+
6+ find_perl_files () {
7+ {
8+ # take all .pl and .pm files
9+ find . -type f -name '*.p[lm]' -print
10+ # take executable files that file(1) thinks are perl files
11+ find . -type f -perm -100 -exec file {} \; -print |
12+ egrep -i ':.*perl[0-9]*\>' |
13+ cut -d: -f1
14+ } | sort -u
15+ }
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # script to detect compile time errors and warnings in all perl files
4+
5+ INCLUDES=" -I src/tools/msvc -I src/tools/msvc/dummylib -I src/backend/catalog"
6+ INCLUDES=" -I src/test/perl -I src/backend/utils/mb/Unicode $INCLUDES "
7+ INCLUDES=" -I src/bin/pg_rewind -I src/test/ssl $INCLUDES "
8+
9+ set -e
10+
11+ . src/tools/perlcheck/find_perl_files
12+
13+ # for zsh
14+ setopt shwordsplit 2> /dev/null || true
15+
16+ find_perl_files | xargs -L 1 perl $INCLUDES -cw 2>&1 | grep -v OK
Original file line number Diff line number Diff line change 77# set this to override default perltidy program:
88PERLTIDY=${PERLTIDY:- perltidy}
99
10- # locate all Perl files in the tree
11- (
12- # take all .pl and .pm files
13- find . -type f -a \( -name ' *.pl' -o -name ' *.pm' \)
14- # take executable files that file(1) thinks are perl files
15- find . -type f -perm -100 -exec file {} \; |
16- egrep -i ' :.*perl[0-9]*\>' |
17- cut -d: -f1
18- ) |
19- sort -u |
20- xargs $PERLTIDY --profile=src/tools/pgindent/perltidyrc
10+ . src/tools/perlcheck/find_perl_files
11+
12+ find_perl_files | xargs $PERLTIDY --profile=src/tools/pgindent/perltidyrc
Original file line number Diff line number Diff line change @@ -12,17 +12,9 @@ set -e
1212# set this to override default perlcritic program:
1313PERLCRITIC=${PERLCRITIC:- perlcritic}
1414
15- # locate all Perl files in the tree
16- {
17- # take all .pl and .pm files
18- find . -type f -name ' *.p[lm]' -print
19- # take executable files that file(1) thinks are perl files
20- find . -type f -perm -100 -exec file {} \; -print |
21- egrep -i ' :.*perl[0-9]*\>' |
22- cut -d: -f1
23- } |
24- sort -u |
25- xargs $PERLCRITIC \
15+ . src/tools/perlcheck/find_perl_files
16+
17+ find_perl_files | xargs $PERLCRITIC \
2618 --quiet \
2719 --program-extensions .pl \
2820 --profile=src/tools/pgperlcritic/perlcriticrc
You can’t perform that action at this time.
0 commit comments