aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/distrib
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-02-16 12:28:10 -0800
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-02-16 12:28:10 -0800
commitf222a4afe96381cc9289af1859a4e28b2d7f54f0 (patch)
treec886058a1e67c458ed316f1dae5815e63611ea3e /tools/distrib
parente87ec957986e4763286d8f22e35b05dca92ca457 (diff)
Add C# checks
Diffstat (limited to 'tools/distrib')
-rwxr-xr-xtools/distrib/check_copyright.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/distrib/check_copyright.py b/tools/distrib/check_copyright.py
index 8a61626d15..ac54a2e9a4 100755
--- a/tools/distrib/check_copyright.py
+++ b/tools/distrib/check_copyright.py
@@ -57,6 +57,7 @@ LICENSE_FMT = {
'.sh': '# %s',
'.proto': '// %s',
'.js': ' * %s',
+ '.cs': '// %s',
}
# pregenerate the actual text that we should have
@@ -71,7 +72,9 @@ OLD_LICENSE_TEXT = dict(
for filename in subprocess.check_output('git ls-tree -r --name-only -r HEAD',
shell=True).splitlines():
ext = os.path.splitext(filename)[1]
- if ext not in LICENSE_TEXT: continue
+ if ext not in LICENSE_TEXT:
+ #print 'pass: %s' % filename
+ continue
license = LICENSE_TEXT[ext]
old_license = OLD_LICENSE_TEXT[ext]
with open(filename) as f:
@@ -81,6 +84,6 @@ for filename in subprocess.check_output('git ls-tree -r --name-only -r HEAD',
elif old_license in text:
pass
#print 'old license in: %s' % filename
- elif 'DO NOT EDIT' not in text:
+ elif 'DO NOT EDIT' not in text and 'AssemblyInfo.cs' not in filename:
print 'no license in: %s' % filename