MCPcopy Create free account
hub / github.com/BoomingTech/Piccolo / CheckForCopyright

Function CheckForCopyright

engine/3rdparty/tinyobjloader/deps/cpplint.py:1622–1632  ·  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

1620
1621
1622def CheckForCopyright(filename, lines, error):
1623 """Logs an error if no Copyright message appears at the top of the file."""
1624
1625 # We'll say it should occur by line 10. Don't forget there's a
1626 # dummy line at the front.
1627 for line in xrange(1, min(len(lines), 11)):
1628 if re.search(r'Copyright', lines[line], re.I): break
1629 else: # means no copyright line was found
1630 error(filename, 0, 'legal/copyright', 5,
1631 'No copyright message found. '
1632 'You should have a line: "Copyright [year] <Copyright Owner>"')
1633
1634
1635def GetIndentLevel(line):

Callers 1

ProcessFileDataFunction · 0.85

Calls 2

minFunction · 0.85
errorFunction · 0.50

Tested by

no test coverage detected