Skip to content

Documentation for C_Cpp.codeAnalysis.clangTidy.enabled in relation to C_Cpp.codeAnalysis.runAutomatically #12682

Open
@thernstig

Description

@thernstig

The documentation for these settings is not possible to understand completely:

  // If `true`, code analysis using `clang-tidy` will be enabled and will run after a file is opened or saved if `C_Cpp.codeAnalysis.runAutomatically` is `true` (the default).
  "C_Cpp.codeAnalysis.clangTidy.enabled": false,

  // If `true`, code analysis will run automatically on a file after it is opened or saved.
  "C_Cpp.codeAnalysis.runAutomatically": true

Open question

Why is C_Cpp.codeAnalysis.clangTidy.enabled even required to have? What happens if it is set to true but C_Cpp.codeAnalysis.runAutomatically is set to false? The problem is that it is not evident what C_Cpp.codeAnalysis.clangTidy.enabled actually does.

Even if C_Cpp.codeAnalysis.clangTidy.enabled is false, it works fine to execute the command C/C++: Run Code Analysis on Active File when having a C file open.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature: Code AnalysisRelated to integration with clang-tidy, cppcheck, cl.exe /analyze, etc.Language ServicedocsIssue related to documentation about the extensionquestion

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions