Skip to content
Snippets Groups Projects
Commit 0fea9434 authored by Max Gaukler's avatar Max Gaukler
Browse files

Copyright header check: Allow other authors

parent 74352d2d
No related branches found
No related tags found
No related merge requests found
......@@ -8,10 +8,12 @@ then
exit 1
fi
HEADERSIZE=$(wc -l < copyrightheader)
# filter out the line that contains year, author name(s) and at least one email adress enclosed in <>
IGNORE_AUTHOR_LINE_REGEXP='^ \* Copyright \(C\) 20[0-9]{2}.*<.*@.*>.*$'
ERRORS=0
for f in $(find src -name '*.java')
do
if ! cat $f|head -n $HEADERSIZE|diff - copyrightheader > /dev/null
if ! diff <(cat $f | head -n $HEADERSIZE | egrep -v "$IGNORE_AUTHOR_LINE_REGEXP") <(cat copyrightheader | egrep -v "$IGNORE_AUTHOR_LINE_REGEXP")
then
echo "Copyright header mismatch on $f"
ERRORS=1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment