microsoft / microsoft/vscode-cpptools
clang-format add option to ignore unknown keys
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Bug type: General
Describe the bug
- OS and Version: Doesn't matter
- VS Code Version: Doesn't matter
- C/C++ Extension Version:
v1.7.1 - Other extensions you installed (and if the issue persists after disabling them): Doesn't matter
- A clear and concise description of what the bug is.
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating where the extension invokes the bundled clang-format and review the related discussion in issue #7867. Determine how a custom argument or the -Wno-error=unknown option could be exposed, then verify that clang-format 13 keys no longer produce an error while existing formatting continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100