Regarding the matching rules for the includePath configuration option in CppProperties.json (vs2019)

daqing wu 0 Reputation points
2024-09-30T10:00:39.4433333+00:00

The root directory of the project is D:\work\code\cpp-service.

├── comm

├── cpp-service

│   ├── .git

│   ├── .gitignore

│   ├── .vs

│   ├── CppProperties.json

│   ├── account_proj

│   ├── auction

│   ├── comm -> ../comm

│   ├── comment_proj

│   ├── coupon_proj

│   ├── deal_proj

│   ├── doctor_proj

│   ├── external_proj

│   ├── findexp

│   ├── inspect_proj

│   ├── pay_center_proj

│   ├── pharmacy_proj

│   ├── platform -> ../platform

│   ├── recipe_proj

│   ├── register_proj

│   ├── schedule_proj

│   ├── search_proj

│   ├── user_proj

│   └── workstation_proj

└── platform

${workspaceRoot} is cpp-service

I configured it as follows:

"includePath": [

"${env.INCLUDE}",

"${workspaceRoot}\\auction\\export_include\\**",

"${workspaceRoot}\\auction\\helper\\**",

"${workspaceRoot}\\*\\ao\\**",

"${workspaceRoot}\\*\\comm\\**",

"${workspaceRoot}\\*\\dao\\bo\\**",

"${workspaceRoot}\\*\\dao\\*\\include\\**",

"${workspaceRoot}\\*\\dao\\*\\src\\**",

"${workspaceRoot}\\*\\web\\*\\src\\**",

"${workspaceRoot}\\..\\comm\\**",

"${workspaceRoot}\\..\\platform\\**"
```]

However, I see in the log output that the path includes ID:\work\code\cpp-service\.git\objects\3c.

1. According to the matching rules, the .git directory should not appear.

2. The paths output in the log do not include D:\work\code\platform, which according to the matching rules with ${workspaceRoot}\\..\\platform\\** should be included.

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,739 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.