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

Does not respect .clang-format-ignore #167

Open
ember91 opened this issue Jun 7, 2024 · 2 comments
Open

Does not respect .clang-format-ignore #167

ember91 opened this issue Jun 7, 2024 · 2 comments

Comments

@ember91
Copy link

ember91 commented Jun 7, 2024

.clang-format-ignore files are not respected with this extension. They are similar to .gitignore files and describe which files should not be formatted.

Note that I'm pointing to a custom clang-format release using "clang-format.executable" in the .code-workspace file. My clang-format has version 18.1.5. It has been tested without going through xaver.clang-format and it does respect .gitignore in that case.

@xavgru12
Copy link

xavgru12 commented Dec 4, 2024

I have the same issue. I think clang-format itself has issues with .clang-format-ignore as well since it does not recognize simple patterns like src/**/* to ignore all its subdirectories. The only thing that works reliably is DisableFormat: true in .clang-format. My use case is I need to ignore a directory with all its subdirectories without having to put a .clang-format inside the directory. Help me, please!

@ember91
Copy link
Author

ember91 commented Dec 25, 2024

This may be an issue with clang-format and not the extension. To be precise an issue with the clang-format -assume-filename option not playing nicely with .clang-format-ignore. See microsoft/vscode-cpptools#13005 and llvm/llvm-project#113099.

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

No branches or pull requests

2 participants