Skip to content
Snippets Groups Projects
Commit ec5392e9 authored by Administrator's avatar Administrator Committed by Florian Uhlig
Browse files

Improve license header test script

Add the external directories to the list of directories which shouln't be
tested.
Only test a file that exists. This solves a problem when files are removed
from the repository.
parent 1f30cd30
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,10 @@ ...@@ -9,6 +9,10 @@
# For all the directories/files listed in the array an explanation should be given. # For all the directories/files listed in the array an explanation should be given.
excludes=( excludes=(
# The directory external is excluded from the check since this directory
# contains code which isn't part of CbmRoot but external dependencies so
# we don't have to test for our license header
external
# The directory is excluded since the files have a license header # The directory is excluded since the files have a license header
# inherited from the ALICE experiment. The code was copied by the # inherited from the ALICE experiment. The code was copied by the
# original author when he started working for CBM. # original author when he started working for CBM.
...@@ -83,7 +87,7 @@ for FILE in $CHANGED_FILES; do ...@@ -83,7 +87,7 @@ for FILE in $CHANGED_FILES; do
for EXCLUDE in "${excludes[@]}"; do for EXCLUDE in "${excludes[@]}"; do
FILE=$(echo $FILE | egrep -v "$EXCLUDE") FILE=$(echo $FILE | egrep -v "$EXCLUDE")
done done
if [[ -n $FILE ]]; then if [[ -n $FILE && -f $FILE ]]; then
licenceHeaderCheck $FILE licenceHeaderCheck $FILE
fi fi
done done
......
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