Skip to content

Commit 4d4c17c

Browse files
committed
with errors
1 parent 6482e4b commit 4d4c17c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

tests/restyle.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ def clang_format(clang_format, config, files):
1919
cmd = [clang_format, "--verbose", f"--style=file:{config.as_posix()}", "-i"]
2020
cmd.extend(files)
2121

22-
proc = subprocess.run(cmd)
23-
proc.check_returncode()
22+
subprocess.run(cmd, check=True)
2423

2524

2625
def find_files(patterns):
@@ -88,10 +87,12 @@ def find_arduino_files():
8887
# ref. https://github.com/libgit2/pygit2/blob/master/src/diff.c ::parse_diff
8988
# TODO: pygit2?
9089
def changed_files():
91-
cmd = ["git", "--no-pager", "diff"]
92-
93-
proc = subprocess.run(cmd, capture_output=True, universal_newlines=True)
94-
proc.check_returncode()
90+
proc = subprocess.run(
91+
["git", "--no-pager", "diff"],
92+
capture_output=True,
93+
check=True,
94+
universal_newlines=True,
95+
)
9596

9697
out = []
9798

@@ -174,7 +175,6 @@ def assert_unchanged():
174175

175176

176177
def run_format(args):
177-
print(args)
178178
targets = []
179179

180180
for include in args.include:

tests/restyle.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ CLANG_FORMAT=${CLANG_FORMAT:-clang-format-15}
1313

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

0 commit comments

Comments
 (0)