[clang-tools-extra] [clang-tidy][NFC][docs] Use single tick for 'false' and 'true' values in options (PR #128362)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 22 08:48:19 PST 2025


https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/128362

Unify doc style for options that use `true` or `false` as default values.

>From 41807b8f379a19714fb89b2f13bc3af389c44ac0 Mon Sep 17 00:00:00 2001
From: Victor Baranov <bar.victor.2002 at gmail.com>
Date: Sat, 22 Feb 2025 17:26:52 +0300
Subject: [PATCH] [clang-tidy][NFC][docs] use single tics instead of double for
 default values

---
 .../bugprone/implicit-widening-of-multiplication-result.rst | 6 +++---
 clang-tools-extra/docs/clang-tidy/checks/cert/err33-c.rst   | 2 +-
 .../docs/clang-tidy/checks/modernize/loop-convert.rst       | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone/implicit-widening-of-multiplication-result.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone/implicit-widening-of-multiplication-result.rst
index 117310d404f6f..efa77925a3fe6 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/bugprone/implicit-widening-of-multiplication-result.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone/implicit-widening-of-multiplication-result.rst
@@ -37,20 +37,20 @@ Options
 .. option:: UseCXXStaticCastsInCppSources
 
    When suggesting fix-its for C++ code, should C++-style ``static_cast<>()``'s
-   be suggested, or C-style casts. Defaults to ``true``.
+   be suggested, or C-style casts. Defaults to `true`.
 
 .. option:: UseCXXHeadersInCppSources
 
    When suggesting to include the appropriate header in C++ code,
    should ``<cstddef>`` header be suggested, or ``<stddef.h>``.
-   Defaults to ``true``.
+   Defaults to `true`.
 
 .. option:: IgnoreConstantIntExpr
 
    If the multiplication operands are compile-time constants (like literals or
    are ``constexpr``) and fit within the source expression type, do not emit a
    diagnostic or suggested fix.  Only considers expressions where the source
-   expression is a signed integer type.  Defaults to ``false``.
+   expression is a signed integer type.  Defaults to `false`.
 
 Examples:
 
diff --git a/clang-tools-extra/docs/clang-tidy/checks/cert/err33-c.rst b/clang-tools-extra/docs/clang-tidy/checks/cert/err33-c.rst
index c1414ec5e086d..9bcc5f9c3823c 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/cert/err33-c.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/cert/err33-c.rst
@@ -190,7 +190,7 @@ This check is an alias of check :doc:`bugprone-unused-return-value <../bugprone/
 with a fixed set of functions.
 
 Suppressing issues by casting to ``void`` is enabled by default and can be
-disabled by setting `AllowCastToVoid` option to ``false``.
+disabled by setting `AllowCastToVoid` option to `false`.
 
 The check corresponds to a part of CERT C Coding Standard rule `ERR33-C.
 Detect and handle standard library errors
diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize/loop-convert.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize/loop-convert.rst
index 9aa655feb5338..0c423edca1822 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/modernize/loop-convert.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/modernize/loop-convert.rst
@@ -144,7 +144,7 @@ lives.
 
    When set to true convert loops when in C++20 or later mode using
    ``std::ranges::reverse_view``.
-   Default value is ``true``.
+   Default value is `true`.
 
 .. option:: MakeReverseRangeFunction
 



More information about the cfe-commits mailing list