Skip to content

Commit

Permalink
Enable clang-format.
Browse files Browse the repository at this point in the history
Should resolve #220.
  • Loading branch information
vgvassilev committed Apr 11, 2021
1 parent 6432585 commit 4851107
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

BasedOnStyle: LLVM
IndentWidth: 2
NamespaceIndentation: All
ColumnLimit: 80

Language: Cpp
Standard: Cpp11
DerivePointerAlignment: false
PointerAlignment: Left

AlignAfterOpenBracket: Align
PenaltyBreakBeforeFirstCallParameter: 50
AlignOperands: true
AllowShortCaseLabelsOnASingleLine: true
IndentCaseLabels: true

IncludeCategories:
- Regex: '^"[^/]+\"'
Priority: 10
- Regex: '^"cling/'
Priority: 20
- Regex: '^"clang/'
Priority: 30
- Regex: '^"llvm/'
Priority: 40
- Regex: '^<'
Priority: 50
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,12 @@ jobs:
compiler: gcc-5
clang-runtime: '11'

- name: ubu18-gcc6-runtime11-coverage
- name: ubu18-gcc6-runtime11-analyzers
os: ubuntu-18.04
compiler: gcc-6
clang-runtime: '11'
coverage: true
clang-format: true

- name: ubu18-gcc8-runtime11
os: ubuntu-18.04
Expand Down Expand Up @@ -565,6 +566,15 @@ jobs:
python3 -m pip show lit
cat obj/CMakeCache.txt
cat obj/CMakeFiles/*.log
- name: Invoke workflow clang-format on compiler-research
if: ${{ success() && (matrix.clang-format == true) }}
uses: benc-uk/workflow-dispatch@v1
with:
workflow: SuggestFormattingChanges
repo: compiler-research/knowall
token: ${{ secrets.PERSONAL_TOKEN }}
ref: main # The SuggestFormattingChanges branch
inputs: '{ "repo": "${{ github.repository }}", "pull_id": "${{ github.event.number }}" }'
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
Expand Down

0 comments on commit 4851107

Please sign in to comment.