MCPcopy Create free account
hub / github.com/apache/mesos / CheckForCopyright

Function CheckForCopyright

support/cpplint.py:1761–1771  ·  view source on GitHub ↗

Logs an error if no Copyright message appears at the top of the file.

(filename, lines, error)

Source from the content-addressed store, hash-verified

1759
1760
1761def CheckForCopyright(filename, lines, error):
1762 """Logs an error if no Copyright message appears at the top of the file."""
1763
1764 # We'll say it should occur by line 10. Don't forget there's a
1765 # dummy line at the front.
1766 for line in xrange(1, min(len(lines), 11)):
1767 if re.search(r'Copyright', lines[line], re.I): break
1768 else: # means no copyright line was found
1769 error(filename, 0, 'legal/copyright', 5,
1770 'No copyright message found. '
1771 'You should have a line: "Copyright [year] <Copyright Owner>"')
1772
1773
1774def GetIndentLevel(line):

Callers 1

ProcessFileDataFunction · 0.85

Calls 2

minFunction · 0.85
errorFunction · 0.85

Tested by

no test coverage detected