Skip to content

Commit

Permalink
with errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mcspr committed Jul 31, 2024
1 parent 6482e4b commit 4d4c17c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions tests/restyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ def clang_format(clang_format, config, files):
cmd = [clang_format, "--verbose", f"--style=file:{config.as_posix()}", "-i"]
cmd.extend(files)

proc = subprocess.run(cmd)
proc.check_returncode()
subprocess.run(cmd, check=True)


def find_files(patterns):
Expand Down Expand Up @@ -88,10 +87,12 @@ def find_arduino_files():
# ref. https://github.com/libgit2/pygit2/blob/master/src/diff.c ::parse_diff
# TODO: pygit2?
def changed_files():
cmd = ["git", "--no-pager", "diff"]

proc = subprocess.run(cmd, capture_output=True, universal_newlines=True)
proc.check_returncode()
proc = subprocess.run(
["git", "--no-pager", "diff"],
capture_output=True,
check=True,
universal_newlines=True,
)

out = []

Expand Down Expand Up @@ -174,7 +175,6 @@ def assert_unchanged():


def run_format(args):
print(args)
targets = []

for include in args.include:
Expand Down
2 changes: 1 addition & 1 deletion tests/restyle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ CLANG_FORMAT=${CLANG_FORMAT:-clang-format-15}

cd $root
python $root/tests/restyle.py format --clang-format=$CLANG_FORMAT preset --include core --include arduino
python $root/tests/restyle.py assert
python $root/tests/restyle.py assert --with-summary --with-notice

0 comments on commit 4d4c17c

Please sign in to comment.