C_Cpp.codeAnalysis.exclude doesn't seem to work
Timmmm opened this issue · comments
Tim Hutt commented
Environment
- OS and Version: RHEL 8
- VS Code Version: 1.88.1
- C/C++ Extension Version: 1.20.5
- If using SSH remote, specify OS of remote machine:
Bug Summary and Steps to Reproduce
Bug Summary:
C_Cpp.codeAnalysis.exclude
claims to exclude files from intellisense. I need this because I have a few 100k line generated C files in my project and every time I open them cpptools
gets stuck at 100% forever and I have to kill it.
However, this setting doesn't seem to do anything.
Steps to reproduce:
- Create
.vscode/settings.json
containing
{
"C_Cpp.codeAnalysis.exclude": {
"${projectRoot}/foo.c": true
}
}
- Create
foo.c
containing:
int foo() {
return sdfsdf;
}
int main() {
foo();
}
- Reload the window to be sure.
- Hover
sdfsdf
, ctrl-clickfoo();
. It all still works. Clearly it is analysing the file.
Expected behavior:
I guess syntax highlighting should still work but no errors should be highlighted and go-to-definition shouldn't work.
Configuration and Logs
No `c_cpp_properties.json`.
-------- Diagnostics - 19/06/2024, 12:34:58
Version: 1.20.5
Current Configuration:
{
"name": "Linux",
"includePath": [
"/home/me/d11/**",
"/home/me/local/vcpkg/installed/x64-linux/include"
],
"defines": [],
"cStandard": "c17",
"cppStandard": "c++14",
"intelliSenseMode": "linux-clang-x64",
"intelliSenseModeIsExplicit": false,
"cStandardIsExplicit": false,
"cppStandardIsExplicit": false,
"mergeConfigurations": false,
"compilerPath": "/usr/bin/g++",
"compilerPathIsExplicit": true,
"browse": {
"path": [
"/home/me/d11/**",
"/home/me/local/vcpkg/installed/x64-linux/include",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true
}
}
cpptools version (native): 1.20.5.0
Translation Unit Mappings:
[ /home/me/d11/foo.c - source TU]:
Translation Unit Configurations:
[ /home/me/d11/foo.c ]:
Process ID: 3048040
Memory Usage: 15 MB
Compiler Path: /usr/bin/g++
Includes:
/home/me/local/vcpkg/installed/x64-linux/include
/usr/lib/gcc/x86_64-redhat-linux/8/include
/usr/local/include
/usr/include
Standard Version: c17
IntelliSense Mode: linux-gcc-x64
Other Flags:
--gcc
--gnu_version=80500
Total Memory Usage: 15 MB
------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 4929
### Other Extensions
_No response_
### Additional context
_No response_