File tree Expand file tree Collapse file tree 5 files changed +10
-6
lines changed Expand file tree Collapse file tree 5 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 3
3
# shell function to find all perl files in the source tree
4
4
5
5
find_perl_files () {
6
+ if [ $# -eq 0 ]; then
7
+ echo 'No files to process' 1>&2
8
+ return
9
+ fi
6
10
{
7
11
# take all .pl and .pm files
8
- find . -type f -name '*.p[lm]' -print
12
+ find "$@" -type f -name '*.p[lm]' -print
9
13
# take executable files that file(1) thinks are perl files
10
- find . -type f -perm -100 -exec file {} \; -print |
14
+ find "$@" -type f -perm -100 -exec file {} \; -print |
11
15
egrep -i ':.*perl[0-9]*\>' |
12
16
cut -d: -f1
13
17
} | sort -u | grep -v '^\./\.git/'
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ PERLCRITIC=${PERLCRITIC:-perlcritic}
14
14
15
15
. src/tools/perlcheck/find_perl_files
16
16
17
- find_perl_files | xargs $PERLCRITIC \
17
+ find_perl_files " $@ " | xargs $PERLCRITIC \
18
18
--quiet \
19
19
--program-extensions .pl \
20
20
--profile=src/tools/perlcheck/perlcriticrc
Original file line number Diff line number Diff line change 13
13
# for zsh
14
14
setopt shwordsplit 2> /dev/null || true
15
15
16
- find_perl_files | xargs -L 1 perl $INCLUDES -cw 2>&1 | grep -v OK
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 @@ -45,7 +45,7 @@ DOING THE INDENT RUN:
45
45
46
46
4) Indent the Perl code using perltidy:
47
47
48
- src/tools/pgindent/pgperltidy
48
+ src/tools/pgindent/pgperltidy .
49
49
50
50
If you want to use some perltidy version that's not in your PATH,
51
51
first set the PERLTIDY environment variable to point to it.
Original file line number Diff line number Diff line change @@ -9,4 +9,4 @@ PERLTIDY=${PERLTIDY:-perltidy}
9
9
10
10
. src/tools/perlcheck/find_perl_files
11
11
12
- find_perl_files | xargs $PERLTIDY --profile=src/tools/pgindent/perltidyrc
12
+ find_perl_files " $@ " | xargs $PERLTIDY --profile=src/tools/pgindent/perltidyrc
You can’t perform that action at this time.
0 commit comments