Add configurable clang-tidy Include Cleaner provider mappings - #14788
Open
Sean McManus (sean-mcmanus) wants to merge 3 commits into
Open
Sean McManus (sean-mcmanus) wants to merge 3 commits into
Sean McManus (sean-mcmanus) wants to merge 3 commits into
Conversation
Colen Garoutte-Carson (Colengms)
approved these changes
Sep 21, 2026
Copilot started reviewing on behalf of
Colen Garoutte-Carson (Colengms)
September 21, 2026 19:37
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The setting is consistently defined, validated, forwarded, redacted, and thoroughly tested.
Review effort: Balanced
Findings: None
What changed in this PR
Adds an opt-in, resource-scoped mapping from Include Cleaner symbols to public headers.
Changes:
- Adds schema, localization, validation, and workspace forwarding.
- Redacts mapping contents from telemetry.
- Adds comprehensive unit coverage.
| File | Description |
|---|---|
Extension/package.json |
Defines the setting schema. |
Extension/package.nls.json |
Documents the setting. |
Extension/src/LanguageServer/settings.ts |
Validates mappings. |
Extension/src/LanguageServer/client.ts |
Forwards mappings to the language server. |
Extension/src/LanguageServer/settingsTracker.ts |
Redacts telemetry values. |
Extension/test/unit/settings.test.ts |
Tests schema, validation, scope, and redaction. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Author
|
The cpptools side needs approval still... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add the opt-in, resource-scoped
C_Cpp.codeAnalysis.clangTidy.includeCleanerMappingssetting for mapping exact Include Cleaner diagnostic symbol names to public include spellings.The setting defaults to an empty object and is forwarded with workspace-folder configuration. Its schema and runtime validation reject empty or control-containing symbol names and malformed header spellings while preserving valid entries, Unicode, and literal operator names. Mapping keys and values are excluded from settings telemetry.
Example:
Validation
Unit tests cover resource scope, schema/runtime agreement, invalid input, exact names, Unicode and prototype-sensitive keys, and telemetry redaction. TypeScript compilation, lint, and all 223 unit tests pass.
Note
Theoretically this could also be implemented on the LLVM/clang-tidy side later on...not sure why they haven't done this yet and/or if they are likely to accept such a change and/or how much work would be involved.