Skip to content

[clang-tidy][NFC] improve documentation for bugprone-argument-comment check #133436

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

Merged

Conversation

vbvictor
Copy link
Contributor

Improve docs for bugprone-argument-comment check by writing explicitly default values for options.
Before this change, it was unclear what values are default.

@llvmbot
Copy link
Member

llvmbot commented Mar 28, 2025

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

@llvm/pr-subscribers-clang-tidy

Author: Baranov Victor (vbvictor)

Changes

Improve docs for bugprone-argument-comment check by writing explicitly default values for options.
Before this change, it was unclear what values are default.


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

1 Files Affected:

  • (modified) clang-tools-extra/docs/clang-tidy/checks/bugprone/argument-comment.rst (+16-9)
diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone/argument-comment.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone/argument-comment.rst
index ab7e668b971c0..8770d7224137a 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/bugprone/argument-comment.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone/argument-comment.rst
@@ -24,18 +24,19 @@ Options
 
 .. option:: StrictMode
 
-   When `false` (default value), the check will ignore leading and trailing
+   When `false`, the check will ignore leading and trailing
    underscores and case when comparing names -- otherwise they are taken into
-   account.
+   account. Default is `false`.
 
 .. option:: IgnoreSingleArgument
 
-   When `true`, the check will ignore the single argument.
+   When `true`, the check will ignore the single argument. Default is `false`.
 
 .. option:: CommentBoolLiterals
 
    When `true`, the check will add argument comments in the format
    ``/*ParameterName=*/`` right before the boolean literal argument.
+   Default is `false`.
 
 Before:
 
@@ -55,8 +56,9 @@ After:
 
 .. option:: CommentIntegerLiterals
 
-   When true, the check will add argument comments in the format
+   When `true`, the check will add argument comments in the format
    ``/*ParameterName=*/`` right before the integer literal argument.
+   Default is `false`.
 
 Before:
 
@@ -76,8 +78,9 @@ After:
 
 .. option:: CommentFloatLiterals
 
-   When true, the check will add argument comments in the format
+   When `true`, the check will add argument comments in the format
    ``/*ParameterName=*/`` right before the float/double literal argument.
+   Default is `false`.
 
 Before:
 
@@ -97,8 +100,9 @@ After:
 
 .. option:: CommentStringLiterals
 
-   When true, the check will add argument comments in the format
+   When `true`, the check will add argument comments in the format
    ``/*ParameterName=*/`` right before the string literal argument.
+   Default is `false`.
 
 Before:
 
@@ -122,8 +126,9 @@ After:
 
 .. option:: CommentCharacterLiterals
 
-   When true, the check will add argument comments in the format
+   When `true`, the check will add argument comments in the format
    ``/*ParameterName=*/`` right before the character literal argument.
+   Default is `false`.
 
 Before:
 
@@ -143,8 +148,9 @@ After:
 
 .. option:: CommentUserDefinedLiterals
 
-   When true, the check will add argument comments in the format
+   When `true`, the check will add argument comments in the format
    ``/*ParameterName=*/`` right before the user defined literal argument.
+   Default is `false`.
 
 Before:
 
@@ -168,8 +174,9 @@ After:
 
 .. option:: CommentNullPtrs
 
-   When true, the check will add argument comments in the format
+   When `true`, the check will add argument comments in the format
    ``/*ParameterName=*/`` right before the nullptr literal argument.
+   Default is `false`.
 
 Before:
 

Copy link
Contributor

@carlosgalvezp carlosgalvezp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vbvictor
Copy link
Contributor Author

@carlosgalvezp, when all checks are passed, could you merge this please, thank you.

@carlosgalvezp carlosgalvezp merged commit ecdbd26 into llvm:main Mar 28, 2025
15 checks passed
@carlosgalvezp
Copy link
Contributor

Sure, thanks!

@vbvictor vbvictor deleted the improve-bugprone-argument-comment-docs branch June 22, 2025 08:16
@vbvictor vbvictor restored the improve-bugprone-argument-comment-docs branch June 22, 2025 08:16
@vbvictor vbvictor deleted the improve-bugprone-argument-comment-docs branch June 22, 2025 08:16
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.

3 participants