aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2019-01-22 12:59:34 +0000
committerAlexander Kornienko <alexfh@google.com>2019-01-22 12:59:34 +0000
commitd85321d7b0b1a40148333789fe0f8fc2037e2c3a (patch)
tree15c44f5d6ed9bd6ba250100aa9eeda48e5e38615
parentd6eb9c35a62963e224ac9c3720db8fb06896bf8e (diff)
[clang-tidy] Fix whitespace in docs. NFC
Actually, just testing commits via monorepo ;) git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@351814 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--docs/clang-tidy/index.rst29
1 files changed, 14 insertions, 15 deletions
diff --git a/docs/clang-tidy/index.rst b/docs/clang-tidy/index.rst
index 4172d134..f8e9270a 100644
--- a/docs/clang-tidy/index.rst
+++ b/docs/clang-tidy/index.rst
@@ -260,21 +260,20 @@ An overview of all the command-line options:
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, 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:
+: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,
+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++
- class Foo
- {
+ class Foo {
// Silent all the diagnostics for the line
Foo(int param); // NOLINT
@@ -283,7 +282,7 @@ if changing the semantics of the code is not desired, the ``NOLINT`` or
// Silent only the specified diagnostics for the next line
// NOLINTNEXTLINE(google-explicit-constructor, google-runtime-int)
- Foo(bool param);
+ Foo(bool param);
};
The formal syntax of ``NOLINT``/``NOLINTNEXTLINE`` is the following:
@@ -307,8 +306,8 @@ The formal syntax of ``NOLINT``/``NOLINTNEXTLINE`` is the following:
Note that whitespaces between ``NOLINT``/``NOLINTNEXTLINE`` and the opening
parenthesis are not allowed (in this case the comment will be treated just as
-``NOLINT``/``NOLINTNEXTLINE``), whereas in check names list (inside
-the parenthesis) whitespaces can be used and will be ignored.
+``NOLINT``/``NOLINTNEXTLINE``), whereas in check names list (inside the
+parenthesis) whitespaces can be used and will be ignored.
.. _LibTooling: http://clang.llvm.org/docs/LibTooling.html
.. _How To Setup Tooling For LLVM: http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html