Closed Carryme1899 closed 1 week ago
I can reproduce this with 0.1.30, but not with 0.1.29.
I believe the underlying cause is the same as https://github.com/clangd/vscode-clangd/issues/722, which was regressed in 0.1.30 and fixed in 0.1.31.
That said, please note the following in the output:
The flag
-clang-tidy-checks
is obsolete and ignored.
Even with 0.1.31, the clangd server is going to ignore this flag.
Clang-tidy checks can be enabled using the config file instead, e.g.
Diagnostics:
ClangTidy:
Add: [
performance-*,
bugprone-*,
misc-*,
google-*,
modernize-*,
readability-*,
portability-*
]
Oops! Sorry for the mix-up. This issue’s in version 0.1.30.
I have a .clang-tidy
file for diagnostics. The flag in settings.json
was just left over from an old setup I forgot to remove.
Great! Then this is just a dupe of #722.
The problem seems to be with the spaces in the command line option. These are not needed and if you remove them, this also works with version 0.1.30
The problem seems to be with the spaces in the command line option. These are not needed and if you remove them, this also works with version 0.1.30
Note that there are legitimate use cases for having spaces in command line options, e.g.:
"clangd.arguments": [
"--query-driver=C:/Program Files/MinGW/bin/gcc.exe"
]
There are users who have things like this in their settings today, and we don't want to break them, so it's important that a revised fix for https://github.com/clangd/vscode-clangd/issues/683 keeps things like this working.
As described in https://github.com/clangd/vscode-clangd/issues/722#issuecomment-2475708195, it seems that the
--clang-tidy-checks
argument causing the issue.Removing the argument or updating to 0.1.31 resolves the problem.
clangd output:
Settings in
.vscode/settings.json
: