Skip to content

Commit

Permalink
CI: Added clang formatter check to the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
BritikovKI committed Feb 27, 2023
1 parent 2a541cb commit a84ffe6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
version: 2.1
jobs:
formatter:
docker:
- image: usiverify/verify-env:current
auth:
username: mydockerhub-user
password: $DOCKERHUB_PASSWORD

steps:
- checkout
- run:
name: run clang formatter
command: cat .clang-files | xargs clang-format --Werror --dry-run

build-recent-gcc-debug:
docker:
- image: usiverify/verify-env:current
Expand Down Expand Up @@ -136,6 +149,7 @@ jobs:
workflows:
build-test:
jobs:
- formatter
- build-starexec-debug:
filters: &filters-build-test
tags:
Expand Down
Empty file added .clang-files
Empty file.
12 changes: 12 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
Language: Cpp
BasedOnStyle: LLVM
ColumnLimit: 120
IndentWidth: 4
AccessModifierOffset: -4
PointerAlignment: Middle
AllowShortFunctionsOnASingleLine: Inline
AllowShortBlocksOnASingleLine: Always
AllowShortIfStatementsOnASingleLine: WithoutElse
IndentCaseLabels: True
SpaceAfterTemplateKeyword: False

0 comments on commit a84ffe6

Please sign in to comment.