microsoft / microsoft/vscode-cpptools

Links to docs for clang-tidy checks are for the bundled version instead of the used version.

Open
#12,804 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Feature: Code Analysis help wanted Language Service
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Environment
  • OS and Version: Windows 11 23H2
  • VS Code Version: 1.94.0
  • C/C++ Extension Version: 1.21.6
Bug Summary and Steps to Reproduce

When using clang-tidy, diagnostic messages displayed in the problems pane contain helpful links to the check's documentation on llvm.org. However, the link is to a version that does not match the version of clang-tidy being used. I noticed this after upgrading LLVM to v19.1.0. This version introduced some new clang-tidy checks, such as use-std-min-max, which did not exist in previous versions. But the link provided by the extension is:

https://releases.llvm.org/18.1.6/tools/clang/tools/extra/docs/clang-tidy/checks/readability/use-std-min-max.html

This link does not work, because it links to the page for v18.1.6, which did not have this particular check. The correct link is:

https://releases.llvm.org/19.1.0/tools/clang/tools/extra/docs/clang-tidy/checks/readability/use-std-min-max.html

Which does work. I'm not sure why it links to 18.1.6, because the bundled version is actually 18.1.8, but in any case I think the extension needs to do clang-tidy --version on whatever binary it's using, and then provide a link to the correct version.

Configuration and Logs
N/A
Other Extensions

No response

Additional context

No response

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

No source files or tests are named. Start by tracing where clang-tidy diagnostics are turned into documentation links and how the selected clang-tidy binary is identified. Done means links use the version reported by that binary, including checks introduced in newer LLVM releases; verify with the reported LLVM 19.1.0 example.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, typescript
Domain
devtools, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.