Skip to content

Commit 5495b17

Browse files
committed
[FAB-9285] Escape periods in filenames for license chk
Properly escape periods in filename wildcard patterns when excluding filenames for license checking. And while we're here, might as well prettify the exclusion list so it's easier to read. Change-Id: Ia596ebdfd2c250b8f6644f49a10e06d7f786802f Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
1 parent 96c10e7 commit 5495b17

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

scripts/check_license.sh

+18-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,24 @@
66
#
77

88
function filterExcludedFiles {
9-
CHECK=`echo "$CHECK" | grep -v .png$ | grep -v .rst$ | grep -v ^.git/ \
10-
| grep -v .pem$ | grep -v .block$ | grep -v .tx$ | grep -v ^LICENSE$ | grep -v _sk$ \
11-
| grep -v .key$ | grep -v \\.gen.go$ | grep -v ^Gopkg.lock$ | grep -v 'testdata/' \
12-
| grep -v .md$ | grep -v ^vendor/ | grep -v ^.build/ | grep -v .pb.go$ | sort -u`
9+
CHECK=`echo "$CHECK" \
10+
| grep -v "^\.git/" \
11+
| grep -v "^\.build/" \
12+
| grep -v "^vendor/" \
13+
| grep -v "testdata/" \
14+
| grep -v "^LICENSE$" \
15+
| grep -v "\.png$" \
16+
| grep -v "\.rst$" \
17+
| grep -v "\.pem$" \
18+
| grep -v "\.block$" \
19+
| grep -v "\.tx$" \
20+
| grep -v "_sk$" \
21+
| grep -v "\.key$" \
22+
| grep -v "\.gen\.go$" \
23+
| grep -v "^Gopkg\.lock$" \
24+
| grep -v "\.md$" \
25+
| grep -v "\.pb\.go$" \
26+
| sort -u`
1327
}
1428

1529
CHECK=$(git diff --name-only --diff-filter=ACMRTUXB HEAD)

0 commit comments

Comments
 (0)