Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vbvictor
Copy link
Contributor

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

@llvmbot
Copy link
Member

llvmbot commented Feb 22, 2025

@llvm/pr-subscribers-clang-tools-extra

Author: Baranov Victor (vbvictor)

Changes

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


Full diff: https://github.com/llvm/llvm-project/pull/128362.diff

3 Files Affected:

  • (modified) clang-tools-extra/docs/clang-tidy/checks/bugprone/implicit-widening-of-multiplication-result.rst (+3-3)
  • (modified) clang-tools-extra/docs/clang-tidy/checks/cert/err33-c.rst (+1-1)
  • (modified) clang-tools-extra/docs/clang-tidy/checks/modernize/loop-convert.rst (+1-1)
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
 

@llvmbot
Copy link
Member

llvmbot commented Feb 22, 2025

@llvm/pr-subscribers-clang-tidy

Author: Baranov Victor (vbvictor)

Changes

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


Full diff: https://github.com/llvm/llvm-project/pull/128362.diff

3 Files Affected:

  • (modified) clang-tools-extra/docs/clang-tidy/checks/bugprone/implicit-widening-of-multiplication-result.rst (+3-3)
  • (modified) clang-tools-extra/docs/clang-tidy/checks/cert/err33-c.rst (+1-1)
  • (modified) clang-tools-extra/docs/clang-tidy/checks/modernize/loop-convert.rst (+1-1)
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
 

@vbvictor
Copy link
Contributor Author

@EugeneZelenko @HerrCai0907, Small change to docs of some checks.

@vbvictor
Copy link
Contributor Author

Thanks for fast approval!
@HerrCai0907, Could you merge, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants