microsoft / microsoft/vscode-cpptools
Feature Request: Add a setting to allow source files to be discerned from header files
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
There are various scenarios in which cpptools will try to discern if a file is a source file or a header file. For example:
- include graph generation - to determine whether a file should be a source node or header node in the graph.
- TU creation - to determine if a header file is requested, and, if so, determine a source file to create the TU with instead.
- code analysis - When a save operation is performed on a source file, code analysis for that file is canceled, to ensure clang-tidy doesn't keep it open/locked. When a header file is saved, all code analysis operations are canceled, as any one of them might be keeping the header open/locked.
- include auto-complete - to determining if a file should be included in the list, or to determine if the includes cache needs to be cleared/updated.
- Goto-def, to determine if a candidate is a source or header candidate.
- (various other places)
This issue tracks adding a setting to allow the user to customize what file extensions (or wildcard patterns, to match files.associations) are considered headers vs. sources, rather than hard-coding these associations.
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 tracing the existing source-versus-header decisions used by include graph generation, translation-unit creation, code analysis, include auto-complete, and Go to Definition. Define the setting's extension or wildcard behavior and verify that each listed workflow respects it instead of relying on hard-coded associations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100