mirror of
https://github.com/MonsterDruide1/OdysseyDecomp
synced 2026-04-23 09:04:21 +00:00
lint: functions ending with _ are non-public
This commit is contained in:
parent
fd75495c31
commit
8b7f94209e
|
|
@ -241,6 +241,10 @@ def header_check_line(line, path, visibility, should_start_class):
|
|||
elif visibility == -1: # inside class, but not in a visibility block
|
||||
allowed = line in ["", "};"] or line.startswith("SEAD_SINGLETON_DISPOSER") or line.startswith("SEAD_RTTI_BASE") or line.startswith("SEAD_RTTI_OVERRIDE")
|
||||
CHECK(lambda a:allowed, line, "Inside class, but not in a visibility block, only empty lines and closing brace allowed!", path)
|
||||
elif visibility == 0: # public
|
||||
if "(" in line: # function
|
||||
function_name = line.split("(")[-2].split(" ")[-1]
|
||||
CHECK(lambda a:not function_name.endswith("_"), line, "Functions ending with an underscore are either protected or private!", path)
|
||||
|
||||
def header_no_offset_comments(c, path):
|
||||
for line in c.splitlines():
|
||||
|
|
|
|||
Loading…
Reference in a new issue