[clang-tools-extra] 83484f8 - Fix nits in clang-tidy's documentation (NFC)

Salman Javed via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 22 00:11:19 PST 2021


Author: Salman Javed
Date: 2021-11-22T21:10:24+13:00
New Revision: 83484f8472ad7f8ab91b4e944a6f092e8f4d16a8

URL: https://github.com/llvm/llvm-project/commit/83484f8472ad7f8ab91b4e944a6f092e8f4d16a8
DIFF: https://github.com/llvm/llvm-project/commit/83484f8472ad7f8ab91b4e944a6f092e8f4d16a8.diff

LOG: Fix nits in clang-tidy's documentation (NFC)

Add commas, articles, and conjunctions where missing.

Added: 
    

Modified: 
    clang-tools-extra/docs/clang-tidy/index.rst

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/docs/clang-tidy/index.rst b/clang-tools-extra/docs/clang-tidy/index.rst
index aa0301dc42b43..fa44dab2c76f2 100644
--- a/clang-tools-extra/docs/clang-tidy/index.rst
+++ b/clang-tools-extra/docs/clang-tidy/index.rst
@@ -25,17 +25,17 @@ Using clang-tidy
 
 :program:`clang-tidy` is a `LibTooling`_-based tool, and it's easier to work
 with if you set up a compile command database for your project (for an example
-of how to do this see `How To Setup Tooling For LLVM`_). You can also specify
+of how to do this, see `How To Setup Tooling For LLVM`_). You can also specify
 compilation options on the command line after ``--``:
 
 .. code-block:: console
 
   $ clang-tidy test.cpp -- -Imy_project/include -DMY_DEFINES ...
 
-:program:`clang-tidy` has its own checks and can also run Clang static analyzer
+:program:`clang-tidy` has its own checks and can also run Clang Static Analyzer
 checks. Each check has a name and the checks to run can be chosen using the
 ``-checks=`` option, which specifies a comma-separated list of positive and
-negative (prefixed with ``-``) globs. Positive globs add subsets of checks,
+negative (prefixed with ``-``) globs. Positive globs add subsets of checks, and
 negative globs remove them. For example,
 
 .. code-block:: console
@@ -61,7 +61,7 @@ Name prefix            Description
 ``altera-``            Checks related to OpenCL programming for FPGAs.
 ``android-``           Checks related to Android.
 ``boost-``             Checks related to Boost library.
-``bugprone-``          Checks that target bugprone code constructs.
+``bugprone-``          Checks that target bug-prone code constructs.
 ``cert-``              Checks related to CERT Secure Coding Guidelines.
 ``clang-analyzer-``    Clang Static Analyzer checks.
 ``concurrency-``       Checks related to concurrent programming (including
@@ -90,11 +90,11 @@ Name prefix            Description
 
 Clang diagnostics are treated in a similar way as check diagnostics. Clang
 diagnostics are displayed by :program:`clang-tidy` and can be filtered out using
-``-checks=`` option. However, the ``-checks=`` option does not affect
+the ``-checks=`` option. However, the ``-checks=`` option does not affect
 compilation arguments, so it cannot turn on Clang warnings which are not
-already turned on in build configuration. The ``-warnings-as-errors=`` option
-upgrades any warnings emitted under the ``-checks=`` flag to errors (but it
-does not enable any checks itself).
+already turned on in the build configuration. The ``-warnings-as-errors=``
+option upgrades any warnings emitted under the ``-checks=`` flag to errors (but
+it does not enable any checks itself).
 
 Clang diagnostics have check names starting with ``clang-diagnostic-``.
 Diagnostics which have a corresponding warning option, are named
@@ -301,8 +301,8 @@ mechanism to suppress diagnostics using ``NOLINT``, ``NOLINTNEXTLINE``, and
 The ``NOLINT`` comment instructs :program:`clang-tidy` to ignore warnings on the
 *same line* (it doesn't apply to a function, a block of code or any other
 language construct; it applies to the line of code it is on). If introducing the
-comment in the same line would change the formatting in an undesired way, the
-``NOLINTNEXTLINE`` comment allows to suppress clang-tidy warnings on the *next
+comment on the same line would change the formatting in an undesired way, the
+``NOLINTNEXTLINE`` comment allows suppressing clang-tidy warnings on the *next
 line*. The ``NOLINTBEGIN`` and ``NOLINTEND`` comments allow suppressing
 clang-tidy warnings on *multiple lines* (affecting all lines between the two
 comments).
@@ -320,8 +320,8 @@ For example:
     // Suppress all the diagnostics for the line
     Foo(int param); // NOLINT
 
-    // Consider explaining the motivation to suppress the warning.
-    Foo(char param); // NOLINT: Allow implicit conversion from `char`, because <some valid reason>.
+    // Consider explaining the motivation to suppress the warning
+    Foo(char param); // NOLINT: Allow implicit conversion from `char`, because <some valid reason>
 
     // Silence only the specified checks for the line
     Foo(double param); // NOLINT(google-explicit-constructor, google-runtime-int)


        


More information about the cfe-commits mailing list