Skip to content

Commit acb775f

Browse files
committed
fix output unbound local error
1 parent 4092248 commit acb775f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

cpp_linter_hooks/clang_format.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ def run_clang_format(args) -> int:
1414
continue
1515
command.append(arg)
1616

17+
retval = 0
18+
output = ""
1719
try:
1820
if "--dry-run" in command:
1921
sp = subprocess.run(command, stdout=subprocess.PIPE)

cpp_linter_hooks/clang_tidy.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ def run_clang_tidy(args) -> int:
1313
if arg == expect_version or arg.startswith("--version"):
1414
continue
1515
command.append(arg)
16+
17+
retval = 0
18+
output = ""
1619
try:
1720
sp = subprocess.run(command, stdout=subprocess.PIPE)
1821
retval = sp.returncode

0 commit comments

Comments
 (0)