Skip to content

Conversation

@zeyi2
Copy link
Member

@zeyi2 zeyi2 commented Nov 19, 2025

Commit 40645ed reintroduced some 80 chars issues, this patch fixes them.

After this modification, all documentations under clang-tools-extra/docs/clang-tidy/checks now pass doc8 linter check.

@llvmbot
Copy link
Member

llvmbot commented Nov 19, 2025

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

Author: mitchell (zeyi2)

Changes

Commit 40645ed reintroduced some 80 chars issues, this patch fixes them.

After this modification, all documentations under clang-tools-extra/docs/clang-tidy/checks now pass doc8 linter check.


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

1 Files Affected:

  • (modified) clang-tools-extra/docs/clang-tidy/checks/bugprone/unsafe-functions.rst (+15-14)
diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone/unsafe-functions.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone/unsafe-functions.rst
index cb7ea415c54b2..e907326f8978a 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/bugprone/unsafe-functions.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone/unsafe-functions.rst
@@ -96,21 +96,22 @@ to be checked. The format is the following, without newlines:
 The functions are matched using POSIX extended regular expressions.
 *(Note: The regular expressions do not support negative* ``(?!)`` *matches.)*
 
-The ``reason`` is optional and is used to provide additional information about the
-reasoning behind the replacement. The default reason is ``is marked as unsafe``.
+The ``reason`` is optional and is used to provide additional information about
+the reasoning behind the replacement. The default reason is
+``is marked as unsafe``.
 
 If ``replacement`` is empty, the default text ``it should not be used`` will be
 shown instead of the suggestion for a replacement.
 
-If the ``reason`` starts with the character ``>``, the reason becomes fully custom.
-The default suffix is disabled even if a ``replacement`` is present, and only the
-reason message is shown after the matched function, to allow better control over
-the suggestions. (The starting ``>`` and whitespace directly after it are
-trimmed from the message.)
+If the ``reason`` starts with the character ``>``, the reason becomes fully
+custom. The default suffix is disabled even if a ``replacement`` is present,
+and only the reason message is shown after the matched function, to allow
+better control over the suggestions. (The starting ``>`` and whitespace
+directly after it are trimmed from the message.)
 
-As an example, the following configuration matches only the function ``original``
-in the default namespace. A similar diagnostic can also be printed using a fully
-custom reason.
+As an example, the following configuration matches only the function
+``original`` in the default namespace. A similar diagnostic can also be printed
+using a fully custom reason.
 
 .. code:: c
 
@@ -123,10 +124,10 @@ custom reason.
    ::std::original(); // no-warning
    original_function(); // no-warning
 
-If the regular expression contains the character ``:``, it is matched against the
-qualified name (i.e. ``std::original``), otherwise the regex is matched against
-the unqualified name (``original``). If the regular expression starts with ``::``
-(or ``^::``), it is matched against the fully qualified name
+If the regular expression contains the character ``:``, it is matched against
+the qualified name (i.e. ``std::original``), otherwise the regex is matched
+against the unqualified name (``original``). If the regular expression starts
+with ``::`` (or ``^::``), it is matched against the fully qualified name
 (``::std::original``).
 
 One of the use cases for fully custom messages is suggesting compiler options

@llvmbot
Copy link
Member

llvmbot commented Nov 19, 2025

@llvm/pr-subscribers-clang-tidy

Author: mitchell (zeyi2)

Changes

Commit 40645ed reintroduced some 80 chars issues, this patch fixes them.

After this modification, all documentations under clang-tools-extra/docs/clang-tidy/checks now pass doc8 linter check.


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

1 Files Affected:

  • (modified) clang-tools-extra/docs/clang-tidy/checks/bugprone/unsafe-functions.rst (+15-14)
diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone/unsafe-functions.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone/unsafe-functions.rst
index cb7ea415c54b2..e907326f8978a 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/bugprone/unsafe-functions.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone/unsafe-functions.rst
@@ -96,21 +96,22 @@ to be checked. The format is the following, without newlines:
 The functions are matched using POSIX extended regular expressions.
 *(Note: The regular expressions do not support negative* ``(?!)`` *matches.)*
 
-The ``reason`` is optional and is used to provide additional information about the
-reasoning behind the replacement. The default reason is ``is marked as unsafe``.
+The ``reason`` is optional and is used to provide additional information about
+the reasoning behind the replacement. The default reason is
+``is marked as unsafe``.
 
 If ``replacement`` is empty, the default text ``it should not be used`` will be
 shown instead of the suggestion for a replacement.
 
-If the ``reason`` starts with the character ``>``, the reason becomes fully custom.
-The default suffix is disabled even if a ``replacement`` is present, and only the
-reason message is shown after the matched function, to allow better control over
-the suggestions. (The starting ``>`` and whitespace directly after it are
-trimmed from the message.)
+If the ``reason`` starts with the character ``>``, the reason becomes fully
+custom. The default suffix is disabled even if a ``replacement`` is present,
+and only the reason message is shown after the matched function, to allow
+better control over the suggestions. (The starting ``>`` and whitespace
+directly after it are trimmed from the message.)
 
-As an example, the following configuration matches only the function ``original``
-in the default namespace. A similar diagnostic can also be printed using a fully
-custom reason.
+As an example, the following configuration matches only the function
+``original`` in the default namespace. A similar diagnostic can also be printed
+using a fully custom reason.
 
 .. code:: c
 
@@ -123,10 +124,10 @@ custom reason.
    ::std::original(); // no-warning
    original_function(); // no-warning
 
-If the regular expression contains the character ``:``, it is matched against the
-qualified name (i.e. ``std::original``), otherwise the regex is matched against
-the unqualified name (``original``). If the regular expression starts with ``::``
-(or ``^::``), it is matched against the fully qualified name
+If the regular expression contains the character ``:``, it is matched against
+the qualified name (i.e. ``std::original``), otherwise the regex is matched
+against the unqualified name (``original``). If the regular expression starts
+with ``::`` (or ``^::``), it is matched against the fully qualified name
 (``::std::original``).
 
 One of the use cases for fully custom messages is suggesting compiler options

@vbvictor
Copy link
Contributor

vbvictor commented Nov 19, 2025

You may not fix all the upcoming issues one by one (Unless you really want). I bet there would be more violations before we finally land the linter.
So my suggestion is to keep working toward linter and fix everything once we land it.

Copy link
Contributor

@vbvictor vbvictor left a comment

Choose a reason for hiding this comment

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

LGTM

@zeyi2
Copy link
Member Author

zeyi2 commented Nov 19, 2025

fix everything once we land it.

I think maybe I can convert this into a draft for fixing all the issues before we land the linter?

@zeyi2 zeyi2 marked this pull request as draft November 19, 2025 15:31
@zeyi2 zeyi2 changed the title [clang-tidy][NFC] Fix formatting issue in unsafe-functions.rst [clang-tidy][NFC] Fix formatting issue in clang-tidy documentations Nov 19, 2025
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