File tree 2 files changed +42
-0
lines changed
2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ ######################################################################
2
+ #
3
+ # src/tools/pgperlcritic/perlcriticrc
4
+ #
5
+ # config file for perlcritic for Postgres project
6
+ #
7
+ #####################################################################
8
+
9
+ severity = 5
10
+
11
+ theme = core
12
+
13
+ # allow octal constants with leading zeros
14
+ [-ValuesAndExpressions::ProhibitLeadingZeros]
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ # src/tools/pgperlcritic/pgperlcritic
4
+
5
+ test -f src/tools/pgperlcritic/perlcriticrc || {
6
+ echo could not find src/tools/pgperlcritic/perlcriticrc
7
+ exit 1
8
+ }
9
+
10
+ set -e
11
+
12
+ # set this to override default perlcritic program:
13
+ PERLCRITIC=${PERLCRITIC:- perlcritic}
14
+
15
+ # locate all Perl files in the tree
16
+ {
17
+ # take all .pl and .pm files
18
+ find . -type f -a \( -name ' *.pl' -o -name ' *.pm' \) -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 \
26
+ --quiet \
27
+ --program-extensions .pl \
28
+ --profile=src/tools/pgperlcritic/perlcriticrc
You can’t perform that action at this time.
0 commit comments