summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-04-08 18:43:39 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-04-08 19:10:23 (GMT)
commitf2637331516790242317997ca099e1bc1901c935 (patch)
treec488cb39fceb6008b89a0f6e3819a1ffa1fc91c5 /BuildTools
parent32f38cc3b6cdfb22c04c438bda59374fb8211f01 (diff)
downloadswift-f2637331516790242317997ca099e1bc1901c935.zip
swift-f2637331516790242317997ca099e1bc1901c935.tar.bz2
Update pre-commit hook to check copyrights.
Diffstat (limited to 'BuildTools')
-rwxr-xr-xBuildTools/Copyrighter.py1
-rwxr-xr-xBuildTools/Git/Hooks/pre-commit5
2 files changed, 6 insertions, 0 deletions
diff --git a/BuildTools/Copyrighter.py b/BuildTools/Copyrighter.py
index 56e6be9..8673c22 100755
--- a/BuildTools/Copyrighter.py
+++ b/BuildTools/Copyrighter.py
@@ -111,6 +111,7 @@ def check_copyright(filename) :
(prolog, copyright, epilog) = parse_file(filename)
if copyright == None :
print "No copyright found in: " + filename
+ print "Please run '" + sys.argv[0] + " set-copyright " + filename + "'"
return False
else :
return True
diff --git a/BuildTools/Git/Hooks/pre-commit b/BuildTools/Git/Hooks/pre-commit
index 9ffc1c7..1e3e941 100755
--- a/BuildTools/Git/Hooks/pre-commit
+++ b/BuildTools/Git/Hooks/pre-commit
@@ -5,3 +5,8 @@ if ! BuildTools/CheckTabs.py; then
echo "Expanded tabs found. Aborting commit."
exit -1
fi
+
+echo "Checking copyrights ..."
+if ! BuildTools/Copyrighter.py check-all-copyrights; then
+ echo "Copyright error found. Aborting commit."
+ exit -1