Skip to content

Commit

Permalink
clang-format ci
Browse files Browse the repository at this point in the history
  • Loading branch information
dzurikmiroslav committed Sep 11, 2024
1 parent aeacddb commit a9f50ee
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
BasedOnStyle: Google
IndentWidth: 4
---
Language: Cpp
ColumnLimit: 180
BreakArrays: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BraceWrapping:
AfterFunction: true
AfterEnum: false
AfterStruct: false
SplitEmptyFunction: false
SortIncludes: true
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<.*\.h>'
Priority: 1
- Regex: '^"sdkconfig.h"'
Priority: 10
- Regex: '^"freertos/.*\.h"'
Priority: 10
SortPriority: 11
- Regex: '^"esp_.*\.h"'
Priority: 10
SortPriority: 12
- Regex: '^"driver/.*\.h"'
Priority: 10
SortPriority: 13
- Regex: '^"(nvs|adc|nvs_flash|cJSON|hal/.*|soc/.*|rom/.*).h"'
Priority: 10
SortPriority: 13
- Regex: '.*'
Priority: 20
AlignOperands: true
AlignConsecutiveMacros: Consecutive
AllowShortFunctionsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
BinPackArguments: false
BinPackParameters: false
SeparateDefinitionBlocks: Always
IndentCaseLabels: false
1 change: 1 addition & 0 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
components/*/lib/**/*
12 changes: 12 additions & 0 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ on:
- created

jobs:
formatting-check:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run clang-format style check
uses: jidicula/[email protected]
with:
clang-format-version: '18'

build:
runs-on: ubuntu-latest

Expand Down

0 comments on commit a9f50ee

Please sign in to comment.