llvm / llvm/llvm-project

[clang-tidy] Ideas on improving how static analyzer checks appear in the check list

Open
#165,741 7 comments 0 reactions 0 assignees View on GitHub
clang-tidy clang:static analyzer documentation
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

There are two issues with the static analyzer docs right now:

1) The static analyzer checks appear *only* in the list of aliases. I'm worried that this might be a bit confusing and/or reduce their visibility; finding entirely new checks in the list of aliases is a bit unexpected. I propose moving them into the main check list.

2) When a user clicks on a static analyzer check, they get taken to a page which, after 5 seconds, redirects them to the static analyzer docs. There are two things they might see on that page:
a) A single sentence description. 5 seconds is *maybe* enough to read and understand that, but a single sentence is quite uninformative.
b) A whole paragraph. ([example 1](https://clang.llvm.org/extra/clang-tidy/checks/clang-analyzer/security.SetgidSetuidOrder.html), [example 2](https://clang.llvm.org/extra/clang-tidy/checks/clang-analyzer/security.PutenvStackArray.html)). 5 seconds is nowhere near enough to read that, and I expect everyone gets interrupted in the middle of it, which is really not good user experience.

I propose removing the redirect and linking to the static analyzer docs directly.

Thoughts?

Contributor guide

Open the contributing guide

Research direction

No source files or tests are named. Start by reviewing how clang-tidy builds the main check list, aliases, and static analyzer check pages; confirm that static analyzer checks appear in the main list and that their links go directly to the static analyzer documentation without a timed redirect.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 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.