Skip to content

Commit

Permalink
ci: Fix style check
Browse files Browse the repository at this point in the history
Resets temporary file pointer to the beginning of a file
after writing the data.
In some cases it caused `uncrustify` to return empty list
instead of corrected output, because it had not any input to process.
  • Loading branch information
wpiet authored and sjanc committed Sep 6, 2024
1 parent a9ea41c commit 5862b40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/check_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def check_file(fname: str, commit: str, upstream: str) -> list[str]:
lines = subprocess.check_output(f"git show {commit}:{fname}",
shell=True)
tmpf.write(lines)

tmpf.seek(0)
in_chunk = False

for s in run_cmd(f"uncrustify -q -c uncrustify.cfg -f {tmpf.name} | "
Expand Down

0 comments on commit 5862b40

Please sign in to comment.