Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Nested .clang-format files are not respected #410

Open
cramertj opened this issue Oct 9, 2024 · 1 comment
Open

[Bug]: Nested .clang-format files are not respected #410

cramertj opened this issue Oct 9, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@cramertj
Copy link

cramertj commented Oct 9, 2024

What happened?

.clang-format files placed in subdirectories should override the .clang-format file of the workspace root. However, in my tests, .clang-format files in subdirectories were ignored, and their settings were not propagated.

It seems like the nested .clang-format files may be missed by this check:

'YAML') patterns=('*.yml' '*.yaml' '.clang-format' '.clang-tidy' '.gemrc') ;;

Additionally, that list does not seem to mention the new .clang-format-ignore files.

Version

Output of bazel --version: aspect 2024.40.2-a7ed65a (with local changes)

How to reproduce

No response

Any other information?

No response

@cramertj cramertj added the bug Something isn't working label Oct 9, 2024
@alexeagle
Copy link
Member

The line you're pointing to is what formats the .clang-tidy file contents, unrelated to how those files are discovered when clang-tidy runs.
Since formatting is a bazel run command, it's not hermetic, and it ought to pick up any files it encounters in the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants