Author: Baranov Victor
Date: 2025-04-04T14:21:48+02:00
New Revision: 547d054ef13c2ca5ec42f7061d8ba941c05605d9

URL: 
https://github.com/llvm/llvm-project/commit/547d054ef13c2ca5ec42f7061d8ba941c05605d9
DIFF: 
https://github.com/llvm/llvm-project/commit/547d054ef13c2ca5ec42f7061d8ba941c05605d9.diff

LOG: [clang-tidy][NFC][doc] improve "options" sections of `misc-`, `cppcore-` 
and other checks (#133694)

Improved "options" sections of various checks:

1. Added Options keyword to be a delimiter between "body" and "options"
parts of docs
2. Added default values where were absent.
3. Changed double-tick to single-tick in default values.

---------

Co-authored-by: EugeneZelenko <eugene.zele...@gmail.com>

Added: 
    

Modified: 
    
clang-tools-extra/docs/clang-tidy/checks/android/comparison-in-temp-failure-retry.rst
    clang-tools-extra/docs/clang-tidy/checks/cert/msc51-cpp.rst
    clang-tools-extra/docs/clang-tidy/checks/concurrency/mt-unsafe.rst
    clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/no-malloc.rst
    clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/owning-memory.rst
    
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-constant-array-index.rst
    
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-member-init.rst
    clang-tools-extra/docs/clang-tidy/checks/misc/coroutine-hostile-raii.rst
    clang-tools-extra/docs/clang-tidy/checks/misc/include-cleaner.rst
    
clang-tools-extra/docs/clang-tidy/checks/misc/non-private-member-variables-in-classes.rst
    
clang-tools-extra/docs/clang-tidy/checks/readability/container-data-pointer.rst
    
clang-tools-extra/docs/clang-tidy/checks/readability/container-size-empty.rst
    
clang-tools-extra/docs/clang-tidy/checks/readability/inconsistent-declaration-parameter-name.rst
    
clang-tools-extra/docs/clang-tidy/checks/readability/redundant-inline-specifier.rst
    
clang-tools-extra/docs/clang-tidy/checks/readability/redundant-smartptr-get.rst

Removed: 
    


################################################################################
diff  --git 
a/clang-tools-extra/docs/clang-tidy/checks/android/comparison-in-temp-failure-retry.rst
 
b/clang-tools-extra/docs/clang-tidy/checks/android/comparison-in-temp-failure-retry.rst
index 93112ee2bea64..31cc72b0579c4 100644
--- 
a/clang-tools-extra/docs/clang-tidy/checks/android/comparison-in-temp-failure-retry.rst
+++ 
b/clang-tools-extra/docs/clang-tidy/checks/android/comparison-in-temp-failure-retry.rst
@@ -41,3 +41,4 @@ Options
 .. option:: RetryMacros
 
    A comma-separated list of the names of retry macros to be checked.
+   Default is `TEMP_FAILURE_RETRY`.

diff  --git a/clang-tools-extra/docs/clang-tidy/checks/cert/msc51-cpp.rst 
b/clang-tools-extra/docs/clang-tidy/checks/cert/msc51-cpp.rst
index 1e0e34efe0a58..99e550aef0e7a 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/cert/msc51-cpp.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/cert/msc51-cpp.rst
@@ -37,4 +37,4 @@ Options
 .. option:: DisallowedSeedTypes
 
    A comma-separated list of the type names which are disallowed.
-   Default values are ``time_t``, ``std::time_t``.
+   Default value is `time_t,std::time_t`.

diff  --git 
a/clang-tools-extra/docs/clang-tidy/checks/concurrency/mt-unsafe.rst 
b/clang-tools-extra/docs/clang-tidy/checks/concurrency/mt-unsafe.rst
index 4e46ba1edc34f..337be787d962b 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/concurrency/mt-unsafe.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/concurrency/mt-unsafe.rst
@@ -32,6 +32,9 @@ Examples:
 
     sleep(1); // implementation may use SIGALRM
 
+Options
+-------
+
 .. option:: FunctionSet
 
   Specifies which functions in libc should be considered thread-safe,

diff  --git 
a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/no-malloc.rst 
b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/no-malloc.rst
index 237520aa6690a..e3a162078a3b8 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/no-malloc.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/no-malloc.rst
@@ -35,14 +35,14 @@ Options
 .. option:: Allocations
 
    Semicolon-separated list of fully qualified names of memory allocation 
functions.
-   Defaults to ``::malloc;::calloc``.
+   Defaults to `::malloc;::calloc`.
 
 .. option:: Deallocations
 
    Semicolon-separated list of fully qualified names of memory allocation 
functions.
-   Defaults to ``::free``.
+   Defaults to `::free`.
 
 .. option:: Reallocations
 
    Semicolon-separated list of fully qualified names of memory allocation 
functions.
-   Defaults to ``::realloc``.
+   Defaults to `::realloc`.

diff  --git 
a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/owning-memory.rst 
b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/owning-memory.rst
index 3c91d09dda1f2..4fc49f8bd6eee 100644
--- 
a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/owning-memory.rst
+++ 
b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/owning-memory.rst
@@ -95,14 +95,14 @@ Options
 
    Semicolon-separated list of fully qualified names of legacy functions that 
create
    resources but cannot introduce ``gsl::owner<>``.
-   Defaults to 
``::malloc;::aligned_alloc;::realloc;::calloc;::fopen;::freopen;::tmpfile``.
+   Defaults to 
`::malloc;::aligned_alloc;::realloc;::calloc;::fopen;::freopen;::tmpfile`.
 
 
 .. option:: LegacyResourceConsumers
 
    Semicolon-separated list of fully qualified names of legacy functions 
expecting
    resource owners as pointer arguments but cannot introduce ``gsl::owner<>``.
-   Defaults to ``::free;::realloc;::freopen;::fclose``.
+   Defaults to `::free;::realloc;::freopen;::fclose`.
 
 
 Limitations

diff  --git 
a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-constant-array-index.rst
 
b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-constant-array-index.rst
index 4e877676cf1fe..9b82e0c45a314 100644
--- 
a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-constant-array-index.rst
+++ 
b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-bounds-constant-array-index.rst
@@ -21,6 +21,7 @@ Options
 
    The check can generate fixes after this option has been set to the name of
    the include file that contains ``gsl::at()``, e.g. `"gsl/gsl.h"`.
+   Default is an empty string.
 
 .. option:: IncludeStyle
 

diff  --git 
a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-member-init.rst
 
b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-member-init.rst
index 97af01a895e1c..3c6797bce9450 100644
--- 
a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-member-init.rst
+++ 
b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-member-init.rst
@@ -37,6 +37,7 @@ Options
 
    If set to `true`, the check will provide fix-its with literal initializers
    \( ``int i = 0;`` \) instead of curly braces \( ``int i{};`` \).
+   Default is `false`.
 
 This rule is part of the `Type safety (Type.6)
 
<https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Pro-type-memberinit>`_

diff  --git 
a/clang-tools-extra/docs/clang-tidy/checks/misc/coroutine-hostile-raii.rst 
b/clang-tools-extra/docs/clang-tidy/checks/misc/coroutine-hostile-raii.rst
index a39c1853b313c..0b054e4e20bd6 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/misc/coroutine-hostile-raii.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/misc/coroutine-hostile-raii.rst
@@ -45,8 +45,8 @@ Options
 
     A semicolon-separated list of qualified types which should not be allowed 
to
     persist across suspension points.
-    Eg: ``my::lockable; a::b;::my::other::lockable;``
-    The default value of this option is `"std::lock_guard;std::scoped_lock"`.
+    Eg: `my::lockable;a::b;::my::other::lockable`
+    The default value of this option is `std::lock_guard;std::scoped_lock`.
 
 .. option:: AllowedAwaitablesList
 
@@ -78,6 +78,6 @@ Options
         co_await wait();
       }
 
-    Eg: ``my::safe::awaitable;other::awaitable``
-    The default value of this option is empty string `""`.
+    Eg: `my::safe::awaitable;other::awaitable`
+    Default is an empty string.
 

diff  --git a/clang-tools-extra/docs/clang-tidy/checks/misc/include-cleaner.rst 
b/clang-tools-extra/docs/clang-tidy/checks/misc/include-cleaner.rst
index e40335b2543b2..d112f01cbc0b1 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/misc/include-cleaner.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/misc/include-cleaner.rst
@@ -31,8 +31,8 @@ Options
 
    A semicolon-separated list of regexes to disable insertion/removal of header
    files that match this regex as a suffix.  E.g., `foo/.*` disables
-   insertion/removal for all headers under the directory `foo`. By default, no 
-   headers will be ignored.
+   insertion/removal for all headers under the directory `foo`. Default is an
+   empty string, no headers will be ignored.
 
 .. option:: DeduplicateFindings
 

diff  --git 
a/clang-tools-extra/docs/clang-tidy/checks/misc/non-private-member-variables-in-classes.rst
 
b/clang-tools-extra/docs/clang-tidy/checks/misc/non-private-member-variables-in-classes.rst
index 57990622e60cd..9d5b7f6673159 100644
--- 
a/clang-tools-extra/docs/clang-tidy/checks/misc/non-private-member-variables-in-classes.rst
+++ 
b/clang-tools-extra/docs/clang-tidy/checks/misc/non-private-member-variables-in-classes.rst
@@ -17,10 +17,11 @@ Options
 
 .. option:: IgnoreClassesWithAllMemberVariablesBeingPublic
 
-   Allows to completely ignore classes if **all** the member variables in that
-   class a declared with a ``public`` access specifier.
+   When `true`, allows to completely ignore classes if **all** the member
+   variables in that class declared with a ``public`` access specifier.
+   Default is `false`.
 
 .. option:: IgnorePublicMemberVariables
 
-   Allows to ignore (not diagnose) **all** the member variables declared with
-   a ``public`` access specifier.
+   When `true`, allows to ignore (not diagnose) **all** the member variables
+   declared with a ``public`` access specifier. Default is `false`.

diff  --git 
a/clang-tools-extra/docs/clang-tidy/checks/readability/container-data-pointer.rst
 
b/clang-tools-extra/docs/clang-tidy/checks/readability/container-data-pointer.rst
index 0d10829ed3c2f..a4eff16cbab14 100644
--- 
a/clang-tools-extra/docs/clang-tidy/checks/readability/container-data-pointer.rst
+++ 
b/clang-tools-extra/docs/clang-tidy/checks/readability/container-data-pointer.rst
@@ -18,4 +18,4 @@ Options
 .. option:: IgnoredContainers
 
    Semicolon-separated list of containers regexp for which this check won't be
-   enforced. Default is `empty`.
+   enforced. Default is an empty string.

diff  --git 
a/clang-tools-extra/docs/clang-tidy/checks/readability/container-size-empty.rst 
b/clang-tools-extra/docs/clang-tidy/checks/readability/container-size-empty.rst
index 43ad74f60dbe5..da6f770b3d74b 100644
--- 
a/clang-tools-extra/docs/clang-tidy/checks/readability/container-size-empty.rst
+++ 
b/clang-tools-extra/docs/clang-tidy/checks/readability/container-size-empty.rst
@@ -25,6 +25,9 @@ The check issues warning if a container has ``empty()`` and 
``size()`` or
 
 `size_type` can be any kind of integer type.
 
+Options
+-------
+
 .. option:: ExcludedComparisonTypes
 
     A semicolon-separated list of class names for which the check will ignore

diff  --git 
a/clang-tools-extra/docs/clang-tidy/checks/readability/inconsistent-declaration-parameter-name.rst
 
b/clang-tools-extra/docs/clang-tidy/checks/readability/inconsistent-declaration-parameter-name.rst
index 95341d52da4f6..4661d2cd8c9a4 100644
--- 
a/clang-tools-extra/docs/clang-tidy/checks/readability/inconsistent-declaration-parameter-name.rst
+++ 
b/clang-tools-extra/docs/clang-tidy/checks/readability/inconsistent-declaration-parameter-name.rst
@@ -52,6 +52,9 @@ In the case of multiple redeclarations or function template 
specializations,
 a warning is issued for every redeclaration or specialization inconsistent with
 the definition or the first declaration seen in a translation unit.
 
+Options
+-------
+
 .. option:: IgnoreMacros
 
    If this option is set to `true` (default is `true`), the check will not warn

diff  --git 
a/clang-tools-extra/docs/clang-tidy/checks/readability/redundant-inline-specifier.rst
 
b/clang-tools-extra/docs/clang-tidy/checks/readability/redundant-inline-specifier.rst
index eee324cddab48..c33c05b42e500 100644
--- 
a/clang-tools-extra/docs/clang-tidy/checks/readability/redundant-inline-specifier.rst
+++ 
b/clang-tools-extra/docs/clang-tidy/checks/readability/redundant-inline-specifier.rst
@@ -29,4 +29,4 @@ Options
 .. option:: StrictMode
 
    If set to `true`, the check will also flag functions and variables that
-   already have internal linkage as redundant.
+   already have internal linkage as redundant. Default is `false`.

diff  --git 
a/clang-tools-extra/docs/clang-tidy/checks/readability/redundant-smartptr-get.rst
 
b/clang-tools-extra/docs/clang-tidy/checks/readability/redundant-smartptr-get.rst
index 20851b0acad97..ab8a3681907e3 100644
--- 
a/clang-tools-extra/docs/clang-tidy/checks/readability/redundant-smartptr-get.rst
+++ 
b/clang-tools-extra/docs/clang-tidy/checks/readability/redundant-smartptr-get.rst
@@ -14,6 +14,8 @@ Examples:
   *ptr->get()  ==>  **ptr
   if (ptr.get() == nullptr) ... => if (ptr == nullptr) ...
 
+Options
+-------
 
 .. option:: IgnoreMacros
 


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to