MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / CheckForCopyright

Function CheckForCopyright

steps/cpplint.py:2248–2258  ·  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

2246
2247
2248def CheckForCopyright(filename, lines, error):
2249 """Logs an error if no Copyright message appears at the top of the file."""
2250
2251 # We'll say it should occur by line 10. Don't forget there's a
2252 # dummy line at the front.
2253 for line in xrange(1, min(len(lines), 11)):
2254 if re.search(r'Copyright', lines[line], re.I): break
2255 else: # means no copyright line was found
2256 error(filename, 0, 'legal/copyright', 5,
2257 'No copyright message found. '
2258 'You should have a line: "Copyright [year] <Copyright Owner>"')
2259
2260
2261def GetIndentLevel(line):

Callers 1

ProcessFileDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected