This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push:
new 5862b407d ci: Fix style check
5862b407d is described below
commit 5862b407d941fd5e2dd00ff85c059922d4275c77
Author: Wojciech Pietraszewski <[email protected]>
AuthorDate: Thu Sep 5 15:04:13 2024 +0200
ci: Fix style check
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.
---
.github/check_style.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/check_style.py b/.github/check_style.py
index de5112cd0..c411fb218 100755
--- a/.github/check_style.py
+++ b/.github/check_style.py
@@ -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} | "