Skip to content

Commit ccdb70d

Browse files
author
Daniel Kroening
authored
Merge pull request diffblue#1304 from peterschrammel/bugfix/linter-copyright-check
Make linter accept alternative copyright header
2 parents 9683cb5 + 4e7a480 commit ccdb70d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/cpplint.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1925,11 +1925,11 @@ def CheckForCopyright(filename, lines, error):
19251925
# We'll say it should occur by line 10. Don't forget there's a
19261926
# dummy line at the front.
19271927
for line in xrange(1, min(len(lines), 11)):
1928-
if re.search(r'Author', lines[line], re.I): break
1928+
if re.search(r'Author|Copyright', lines[line], re.I): break
19291929
else: # means no copyright line was found
19301930
error(filename, 0, 'legal/copyright', 5,
19311931
'No copyright message found. '
1932-
'You should have a line: "Author: <name>"')
1932+
'You should have a line: "Author: <name>" or "Copyright <year> ..."')
19331933

19341934

19351935
def GetIndentLevel(line):

0 commit comments

Comments
 (0)