We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 74352d2 commit 0fea943Copy full SHA for 0fea943
test.sh
@@ -8,10 +8,12 @@ then
8
exit 1
9
fi
10
HEADERSIZE=$(wc -l < copyrightheader)
11
+# filter out the line that contains year, author name(s) and at least one email adress enclosed in <>
12
+IGNORE_AUTHOR_LINE_REGEXP='^ \* Copyright \(C\) 20[0-9]{2}.*<.*@.*>.*$'
13
ERRORS=0
14
for f in $(find src -name '*.java')
15
do
- if ! cat $f|head -n $HEADERSIZE|diff - copyrightheader > /dev/null
16
+ if ! diff <(cat $f | head -n $HEADERSIZE | egrep -v "$IGNORE_AUTHOR_LINE_REGEXP") <(cat copyrightheader | egrep -v "$IGNORE_AUTHOR_LINE_REGEXP")
17
then
18
echo "Copyright header mismatch on $f"
19
ERRORS=1
0 commit comments