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

Function reformat

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

Source from the content-addressed store, hash-verified

56
57
58def reformat(filenames):
59 for filename in filenames:
60 with open(filename, "r+b") as f:
61 try:
62 f.seek(-1, os.SEEK_END)
63 if f.read(1) != b"\n":
64 f.write(b"\n")
65 except OSError:
66 f.seek(0)
67 subprocess.check_call([clang_format_bin, "-i"] + filenames)
68
69
70def warn(filenames):

Callers 1

mainFunction · 0.85

Calls 1

readMethod · 0.45

Tested by

no test coverage detected