Skip to content

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

Open
@bshoshany

Description

@bshoshany

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature: Code AnalysisRelated to integration with clang-tidy, cppcheck, cl.exe /analyze, etc.Language Servicebughelp wantedCan be fixed in the public (open source) repo.

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions