microsoft / microsoft/vscode-cpptools

Documentation for `C_Cpp.codeAnalysis.clangTidy.enabled` in relation to `C_Cpp.codeAnalysis.runAutomatically`

Open
#12,682 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

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.

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

Start with the descriptions for C_Cpp.codeAnalysis.clangTidy.enabled and C_Cpp.codeAnalysis.runAutomatically, then inspect the behavior of C/C++: Run Code Analysis on Active File. Verify how each setting affects automatic and manual analysis. Done when the documentation clearly explains their relationship and the effect of each true/false combination.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.