microsoft / microsoft/vscode-makefile-tools

code snip not work for header that not included

Open
#333 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Feature: Configuration
Dominant language
TypeScript
Stars
242
Forks
78
PR merge metrics
No merged PRs in 30d

Description

is it possible to make code snip work for the header file that not include in the c or cpp
like i want to finish my code in header first then include it in c or cpp later just for the work flow
or when im using #ifdef TEST then include test.h but when not #define TEST the snip not working

here my Makefile

CFLAGS = -Wall -std=c++2a
INCLUDE_PATH = -Iinclude
LIBRARY = -lpthread

main: src/*.cpp
	g++ -o out/Game $^ $(CFLAGS) $(INCLUDE_PATH) $(LIBRARY)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided Makefile, including its src/*.cpp target, CFLAGS, and include path, and reproduce the case where a header is not included or is guarded by TEST. Trace how the extension discovers source files and headers for code snippets. Done means snippets work for the described header-only workflow and the conditional-include case.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cpp, vscode
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.