Skip to content

Commit 3e623f6

Browse files
committed
Revert "Fix up linter script to accept new Copyright label"
This reverts commit 60c5091.
1 parent 60c5091 commit 3e623f6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/cpplint.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,11 +1920,14 @@ def ReverseCloseExpression(clean_lines, linenum, pos):
19201920
def CheckForCopyright(filename, lines, error):
19211921
"""Logs an error if no Copyright message appears at the top of the file."""
19221922

1923-
# Line one should contain the word 'Copyright' somewhere
1924-
if not re.search(r'Copyright', lines[1], re.I):
1923+
# We'll say it should occur by line 10. Don't forget there's a
1924+
# dummy line at the front.
1925+
for line in xrange(1, min(len(lines), 11)):
1926+
if re.search(r'Author', lines[line], re.I): break
1927+
else: # means no copyright line was found
19251928
error(filename, 0, 'legal/copyright', 5,
19261929
'No copyright message found. '
1927-
'You should use the standard copyright block.')
1930+
'You should have a line: "Author: <name>"')
19281931

19291932

19301933
def GetIndentLevel(line):

0 commit comments

Comments
 (0)