Skip to content

Commit

Permalink
ci: run clang-format as part of lint
Browse files Browse the repository at this point in the history
  • Loading branch information
quantum5 committed Oct 2, 2021
1 parent 4ffac74 commit 0be4136
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
BasedOnStyle: LLVM
---
Language: Cpp
PointerAlignment: Right
ColumnLimit: 120
IndentWidth: 4
SpaceAfterCStyleCast: yes
AllowShortFunctionsOnASingleLine: Inline
SpacesBeforeTrailingComments: 2
Cpp11BracedListStyle: no
AlignConsecutiveMacros: Consecutive
IndentCaseLabels: yes
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ jobs:
black --version
flake8 --version
flake8
- name: Install clang-format 12
run: |
wget -O clang-format https://github.com/DMOJ/clang-tools-static-binaries/releases/download/master-5ea3d18c/clang-format-12_linux-amd64
chmod a+x ./clang-format
- name: Run clang-format
run: find dmoj/cptbox/ \( -name '*.h' -or -name '*.cpp' \) -not -name _cptbox.cpp -print0 | xargs -0 ./clang-format --dry-run -Werror --color
mypy:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 0be4136

Please sign in to comment.