Browse Source

Update check_copyright.py to ignore #! lines in scripts.

Doug Ilijev 9 năm trước cách đây
mục cha
commit
34678a8967
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      jenkins/check_copyright.py

+ 3 - 0
jenkins/check_copyright.py

@@ -42,6 +42,9 @@ def report_incorrect(file_name, pairs):
 linecount = 0
 pairs = []
 with open(file_name, 'r') as sourcefile:
+    hashbang = sourcefile.readline()
+    if not hashbang.startswith("#!"):
+        sourcefile.seek(0)
     pairs += zip(regexes, sourcefile)
 
 for (regex, line) in pairs: