Skip to content

Include C++ sources in the shared formatter - #385

Merged
EdSchouten merged 1 commit into
buildbarn:mainfrom
finn-ball:fix/cpp-formatting
Oct 5, 2026
Merged

EdSchouten merged 1 commit into
buildbarn:mainfrom
finn-ball:fix/cpp-formatting

Conversation

@finn-ball

Copy link
Copy Markdown
Contributor

Extend the existing clang-format invocation to cover C++ sources and headers alongside Protobuf files, so downstream repositories can use the shared formatting check for C++.

Comment thread tools/reformat.sh Outdated
Comment thread tools/reformat.sh Outdated
# Protobuf
find . -name '*.proto' -exec "$clang_format" -i {} +
# C++ and Protobuf
find . \( -name '*.proto' -o -name '*.cc' -o -name '*.cpp' -o -name '*.cxx' \

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you like this to remain as a find or would git-ls-files be more appropriate?

@EdSchouten
EdSchouten merged commit 0c18dd7 into buildbarn:main Oct 5, 2026
3 checks passed
@EdSchouten

Copy link
Copy Markdown
Member

Find is fine. That way you don't need to "git add" before running the reformatter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants