summaryrefslogtreecommitdiff
path: root/clang-tools-extra/docs
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2018-10-23 16:48:16 +0000
committerAlexander Kornienko <alexfh@google.com>2018-10-23 16:48:16 +0000
commit6780707d29a224786e8b73d609552bec71d7531a (patch)
treec9d7ca567f2e60201a88834c83dfa3b404c950b2 /clang-tools-extra/docs
parent84c4d80c0402429ee169421a848dae9bb158b10b (diff)
[clang-tidy] Add a separate section for NOLINT(NEXTLINE)? doc.
Diffstat (limited to 'clang-tools-extra/docs')
-rw-r--r--clang-tools-extra/docs/clang-tidy/index.rst17
1 files changed, 10 insertions, 7 deletions
diff --git a/clang-tools-extra/docs/clang-tidy/index.rst b/clang-tools-extra/docs/clang-tidy/index.rst
index 06963ae5f5f..20b18b4bf59 100644
--- a/clang-tools-extra/docs/clang-tidy/index.rst
+++ b/clang-tools-extra/docs/clang-tidy/index.rst
@@ -255,16 +255,19 @@ An overview of all the command-line options:
value: 'some value'
...
+Suppressing Undesired Diagnostics
+=================================
+
:program:`clang-tidy` diagnostics are intended to call out code that does
not adhere to a coding standard, or is otherwise problematic in some way.
However, if it is known that the code is correct, the check-specific ways
-to silence the diagnostics could be used, if they are available (e.g.
-bugprone-use-after-move can be silenced by re-initializing the variable after
-it has been moved out, misc-string-integer-assignment can be suppressed by
-explicitly casting the integer to char, readability-implicit-bool-conversion
-can also be suppressed by using explicit casts, etc.). If they are not
-available or if changing the semantics of the code is not desired,
-the ``NOLINT`` or ``NOLINTNEXTLINE`` comments can be used instead. For example:
+to silence the diagnostics could be used, if they are available (e.g.
+bugprone-use-after-move can be silenced by re-initializing the variable after it
+has been moved out, bugprone-string-integer-assignment can be suppressed by
+explicitly casting the integer to char, readability-implicit-bool-conversion can
+also be suppressed by using explicit casts, etc.). If they are not available or
+if changing the semantics of the code is not desired, the ``NOLINT`` or
+``NOLINTNEXTLINE`` comments can be used instead. For example:
.. code-block:: c++