MCPcopy Create free account
hub / github.com/ddnet/ddnet / warn

Function warn

scripts/fix_style.py:70–82  ·  view source on GitHub ↗
(filenames)

Source from the content-addressed store, hash-verified

68
69
70def warn(filenames):
71 clang = subprocess.call([clang_format_bin, "-Werror", "--dry-run"] + filenames)
72 newline = 0
73 for filename in filenames:
74 with open(filename, "rb") as f:
75 try:
76 f.seek(-1, os.SEEK_END)
77 if f.read(1) != b"\n":
78 print(filename + ": error: missing newline at EOF", file=sys.stderr)
79 newline = 1
80 except OSError:
81 f.seek(0)
82 return clang or newline
83
84
85def main():

Callers 1

mainFunction · 0.85

Calls 1

readMethod · 0.45

Tested by

no test coverage detected