Skip to content

Commit 67a83c7

Browse files
Update to leverage clang-format-12
1 parent 405a63d commit 67a83c7

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

.clang-format

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,17 @@ UseTab: Never
5252
BreakBeforeBraces: Custom
5353

5454
# Control of individual brace wrapping cases
55-
BraceWrapping: {
56-
AfterClass: 'true',
57-
AfterControlStatement: 'true',
58-
AfterEnum : 'true',
59-
AfterFunction : 'true',
60-
AfterNamespace : 'true',
61-
AfterStruct : 'true',
62-
AfterUnion : 'true',
63-
BeforeCatch : 'true',
64-
BeforeElse : 'true',
65-
IndentBraces : 'false',
66-
}
55+
BraceWrapping:
56+
AfterCaseLabel : 'true'
57+
AfterClass: 'true'
58+
AfterControlStatement: 'true'
59+
AfterEnum : 'true'
60+
AfterFunction : 'true'
61+
AfterNamespace : 'true'
62+
AfterStruct : 'true'
63+
AfterUnion : 'true'
64+
BeforeCatch : 'true'
65+
BeforeElse : 'true'
66+
IndentBraces : 'false'
67+
6768
...

.github/workflows/clang_format.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@ on:
1515

1616
jobs:
1717
clang_format:
18-
runs-on: ubuntu-20.04
18+
runs-on: ubuntu-22.04
1919
steps:
2020
- uses: actions/checkout@v1
2121

2222
- name: Run clang format
2323
run: |
2424
sudo apt update
25-
sudo apt install -y git clang-format-8
25+
sudo apt install -y git clang-format-12
2626
if [ $? -ge 1 ]; then return 1; fi
2727
./.run-clang-format
2828
if [ $? -ge 1 ]; then return 1; fi
2929
output=$(git diff)
30+
echo $output
3031
if [ -n "$output" ]; then exit 1; else exit 0; fi

.github/workflows/cmake_format.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88
pull_request:
99
paths:
1010
- 'tesseract**'
11-
- '.github/workflows/clang_format.yml'
12-
- '**clang-format'
11+
- '.github/workflows/cmake_format.yml'
12+
- '**cmake-format'
1313
schedule:
1414
- cron: '0 5 * * *'
1515

.run-clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/bin/bash
2-
find . -type d \( -name bullet3_ros -o -name fcl_ros -o -name libccd_ros -o -name gtest_ros -o -name tesseract_ext \) -prune -o -type f -regex '.*\.\(cpp\|hpp\|cc\|cxx\|h\|hxx\)' -exec clang-format-8 -style=file -i {} \;
2+
find . -type d \( -name bullet3_ros -o -name fcl_ros -o -name libccd_ros -o -name gtest_ros -o -name tesseract_ext \) -prune -o -type f -regex '.*\.\(cpp\|hpp\|cc\|cxx\|h\|hxx\)' -exec clang-format-12 -style=file -i {} \;

0 commit comments

Comments
 (0)