Skip to content

Commit 7e72b2b

Browse files
DerekSeamanclaude
andcommitted
fix(ci): use .clang-format file in CI and set AllowShortFunctionsOnASingleLine: None
- Switch CI clang-format-18 check from --style=Google to --style=file so it reads the repo's .clang-format instead of raw Google defaults. This eliminates version-skew between clang-format-18 (CI) and clang-format-21 (local pre-commit hook). - Change AllowShortFunctionsOnASingleLine from Empty to None in .clang-format so short function bodies (including empty {}) are always expanded to multi-line, ensuring v18 and v21 agree. - Re-format irk_capture.h: expand setup() override {} to multi-line. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 412389b commit 7e72b2b

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.clang-format

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ SpacesInContainerLiterals: true
2323
# ESP-IDF specific: Do not alphabetize headers
2424
SortIncludes: false
2525

26-
# Clean up empty functions/blocks
27-
AllowShortFunctionsOnASingleLine: Empty
26+
# Never collapse function bodies to single line
27+
AllowShortFunctionsOnASingleLine: None
2828
KeepEmptyLinesAtTheStartOfBlocks: false
2929
---

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: C++ Format Check
4242
run: |
4343
find components -name '*.cpp' -o -name '*.h' | \
44-
xargs clang-format-18 --style=Google --dry-run --Werror
44+
xargs clang-format-18 --style=file --dry-run --Werror
4545
4646
# 3. Python Lint
4747
- name: Python Lint

components/irk_capture/irk_capture.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ class IRKCaptureText : public text::Text, public Component {
6767
// Text sensor for IRK/Address output
6868
class IRKCaptureTextSensor : public text_sensor::TextSensor, public Component {
6969
public:
70-
void setup() override {}
70+
void setup() override {
71+
}
7172
void dump_config() override;
7273
};
7374

0 commit comments

Comments
 (0)