Skip to content

Commit

Permalink
added explicit clang-format step in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kvedala committed Aug 26, 2020
1 parent 3b6d22e commit 2ccc3a3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/awesome_workflow.yml
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: requirements
run: |
sudo apt -qq -y update
sudo apt -qq install clang-tidy-11
sudo apt -qq install clang-tidy-10 clang-format-10
# checks are passing with less errors when used with this version.
# The default installs v6.0 which did not work out well in my tests
- name: Setup Git Specs
Expand Down Expand Up @@ -122,18 +122,18 @@ jobs:
if not cpp_files:
sys.exit(0)
subprocess.run(["clang-format-10", "-i", "-style=file", *cpp_files],
check=True, text=True, stderr=subprocess.STDOUT)
subprocess.run(["git commit", "-am 'clang-format fixes for $GITHUB_SHA' || true"],
check=True, text=True, stderr=subprocess.STDOUT)
subprocess.run(["clang-tidy-10", "--fix", "-p=build", "--extra-arg=-std=c++11", *cpp_files, "--"],
check=True, text=True, stderr=subprocess.STDOUT)
# for cpp_file in cpp_files:
# subprocess.run(["clang-tidy-10", "--fix", "-p=build", cpp_file, "--"],
# check=True, text=True, stderr=subprocess.STDOUT)
# print("g++:")
# compile_exts = tuple(".c .c++ .cc .cpp .cu .cxx".split())
# compile_files = [file for file in cpp_files if file.lower().endswith(compile_exts)]
# for cpp_file in cpp_files:
# subprocess.run(["g++", cpp_file], check=True, text=True)
upper_files = [file for file in cpp_files if file != file.lower()]
if upper_files:
print(f"{len(upper_files)} files contain uppercase characters:")
Expand Down

0 comments on commit 2ccc3a3

Please sign in to comment.