mirror of
https://github.com/postgres/postgres.git
synced 2025-05-26 18:17:33 +03:00
pgperltidy as well as pgperlcritic and pgperlsyncheck now allow passing files and directories on the command line, like pgindent does. (Previously, they would always operate on the whole tree.) Also, for consistency with pgindent's new behavior (as of b16259b3c1), passing an argument is now required. To get the previous default behavior, use "pgperltidy ." for example. Discussion: https://www.postgresql.org/message-id/flat/45aacd8a-5265-d9da-8df2-b8e2c0cf6a07%40eisentraut.org
21 lines
427 B
Bash
Executable File
21 lines
427 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# src/tools/perlcheck/pgperlcritic
|
|
|
|
test -f src/tools/perlcheck/perlcriticrc || {
|
|
echo could not find src/tools/perlcheck/perlcriticrc
|
|
exit 1
|
|
}
|
|
|
|
set -e
|
|
|
|
# set this to override default perlcritic program:
|
|
PERLCRITIC=${PERLCRITIC:-perlcritic}
|
|
|
|
. src/tools/perlcheck/find_perl_files
|
|
|
|
find_perl_files "$@" | xargs $PERLCRITIC \
|
|
--quiet \
|
|
--program-extensions .pl \
|
|
--profile=src/tools/perlcheck/perlcriticrc
|