microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.52k stars 1.55k forks source link

clang-format add option to ignore unknown keys #8683

Open jerryc05 opened 2 years ago

jerryc05 commented 2 years ago

Bug type: General

Describe the bug

I added some clang-format 13 specific formatting keys and then I got unknown key ... because the bundled clang-format is only v12

My suggestion would be add a switch for this extension for ignoring unknown keys. To be specific, add an input field to pass custom args to clang-format or add a switch so that the extension automatically passes -Wno-error=unknown to clang-format if checked.

Similar #7867

sean-mcmanus commented 2 years ago

Another alternative for this specific repro is to use https://github.com/microsoft/vscode-cpptools/releases/tag/1.8.0-insiders2, since we ship clang 13.0 with that, and/or set your C_Cpp.clang_format_path to a 13.0 clang-format.

github-actions[bot] commented 2 years ago

This feature request is being closed due to insufficient upvotes. When enough upvotes are received, this issue will be eligible for our backlog.

github-actions[bot] commented 5 months ago

This feature request has received enough votes to be added to our backlog.