Skip to content

Commit bca943c

Browse files
authored
Merge pull request #144 from ladyada-piclaw/fix-clang-format-ci
Add clang-format CI job; reformat sources
2 parents c0290d4 + 69ccd1b commit bca943c

File tree

5 files changed

+223
-194
lines changed

5 files changed

+223
-194
lines changed

.clang-format

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Language: Cpp
2+
BasedOnStyle: Google
3+
IndentWidth: 2
4+
ColumnLimit: 80
5+
AllowShortBlocksOnASingleLine: Always
6+
AllowShortFunctionsOnASingleLine: Empty
7+
AllowShortIfStatementsOnASingleLine: false
8+
AllowShortLoopsOnASingleLine: false
9+
BinPackArguments: true
10+
BinPackParameters: true
11+
BreakBeforeBraces: Attach
12+
DerivePointerAlignment: false
13+
PointerAlignment: Left
14+
SpacesBeforeTrailingComments: 1

.github/workflows/githubci.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,19 @@ name: Arduino Library CI
33
on: [pull_request, push, repository_dispatch]
44

55
jobs:
6+
clang-format:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: actions/checkout@v4
11+
with:
12+
repository: adafruit/ci-arduino
13+
path: ci
14+
- name: Check code formatting with clang-format
15+
run: python3 ci/run-clang-format.py -e "ci/*" -e "bin/*" -r .
16+
617
build:
18+
needs: clang-format
719
runs-on: ubuntu-latest
820

921
steps:
@@ -22,11 +34,8 @@ jobs:
2234
- name: test platforms
2335
run: python3 ci/build_platform.py main_platforms
2436

25-
- name: clang
26-
run: python3 ci/run-clang-format.py -e "ci/*" -e "bin/*" -r .
27-
2837
- name: doxygen
2938
env:
3039
GH_REPO_TOKEN: ${{ secrets.GH_REPO_TOKEN }}
3140
PRETTYNAME : "Adafruit FONA Arduino Library"
32-
run: bash ci/doxy_gen_and_deploy.sh
41+
run: bash ci/doxy_gen_and_deploy.sh

0 commit comments

Comments
 (0)