tools/codeformat.py: Remove sizeof fixup.
Formatting for `* sizeof` was fixed in uncrustify v0.71, so we no longer need the fixups for it. Also, there was one file where the updated uncrustify caught a problem that the regex didn't pick up, which is updated in this commit. Signed-off-by: David Lechner <david@pybricks.com>
This commit is contained in:
parent
bd7c92e17d
commit
ecd7826316
|
@ -76,9 +76,6 @@ C_EXTS = (
|
|||
PY_EXTS = (".py",)
|
||||
|
||||
|
||||
FIXUP_REPLACEMENTS = ((re.compile("sizeof\(([a-z_]+)\) \*\(([a-z_]+)\)"), r"sizeof(\1) * (\2)"),)
|
||||
|
||||
|
||||
def list_files(paths, exclusions=None, prefix=""):
|
||||
files = set()
|
||||
for pattern in paths:
|
||||
|
@ -124,10 +121,6 @@ def fixup_c(filename):
|
|||
if directive == "endif":
|
||||
dedent_stack.pop()
|
||||
|
||||
# Apply general regex-based fixups.
|
||||
for regex, replacement in FIXUP_REPLACEMENTS:
|
||||
l = regex.sub(replacement, l)
|
||||
|
||||
# Write out line.
|
||||
f.write(l)
|
||||
|
||||
|
|
Loading…
Reference in New Issue