Skip to content

Commit

Permalink
Fix clang-10 formatting check (faasm#282)
Browse files Browse the repository at this point in the history
* format: fix clang-10 formatting check

* apply pr comments
  • Loading branch information
csegarragonz authored Nov 7, 2022
1 parent 3d17b93 commit 18f98f2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tasks/format_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ def format(ctx, check=False):
.split("\n")[:-1]
)

clang_cmd = "clang-format-10 -i {}".format(" ".join(files_to_check))
clang_cmd = [
"clang-format-10",
"--dry-run --Werror" if check else "-i",
" ".join(files_to_check),
]
clang_cmd = " ".join(clang_cmd)
run(clang_cmd, shell=True, check=True, cwd=PROJ_ROOT)

# ---- Append newlines to C/C++ files if not there ----
Expand Down

0 comments on commit 18f98f2

Please sign in to comment.