From 735e4332e2a63e5f0a04f91472fa2403c7d37fe3 Mon Sep 17 00:00:00 2001 From: Salman Javed Date: Fri, 12 Nov 2021 22:36:21 +1300 Subject: [PATCH] Make minor fixes to docs based on post-commit review of commit 5de69e1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Jaro–Winkler and Sørensen–Dice should use en-dashes not regular dashes. In reStructuredText this is typed as `--`. - Letters at the beginning of a sentence should be capitalized. --- .../checks/bugprone-easily-swappable-parameters.rst | 2 +- .../docs/clang-tidy/checks/concurrency-mt-unsafe.rst | 2 +- .../docs/clang-tidy/checks/google-build-namespaces.rst | 2 +- .../clang-tidy/checks/google-global-names-in-headers.rst | 2 +- .../docs/clang-tidy/checks/llvm-header-guard.rst | 2 +- .../clang-tidy/checks/misc-definitions-in-headers.rst | 2 +- .../checks/readability-suspicious-call-argument.rst | 8 ++++---- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone-easily-swappable-parameters.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone-easily-swappable-parameters.rst index dad4205858a8..47970bfbbc40 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/bugprone-easily-swappable-parameters.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone-easily-swappable-parameters.rst @@ -154,7 +154,7 @@ noisiness. ``a < b``. * The parameters are further passed to the same function to the same parameter of that function, of the same overload. - e.g. ``f(a, 1)`` and ``f(b, 2)`` to some ``f(T, int)``. + E.g. ``f(a, 1)`` and ``f(b, 2)`` to some ``f(T, int)``. .. note:: diff --git a/clang-tools-extra/docs/clang-tidy/checks/concurrency-mt-unsafe.rst b/clang-tools-extra/docs/clang-tidy/checks/concurrency-mt-unsafe.rst index 67d8f99ab45b..4e46ba1edc34 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/concurrency-mt-unsafe.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/concurrency-mt-unsafe.rst @@ -12,7 +12,7 @@ Note that using some thread-unsafe functions may be still valid in concurrent programming if only a single thread is used (e.g. setenv(3)), however, some functions may track a state in global variables which would be clobbered by subsequent (non-parallel, but concurrent) calls to -a related function. e.g. the following code suffers from unprotected +a related function. E.g. the following code suffers from unprotected accesses to a global state: .. code-block:: c++ diff --git a/clang-tools-extra/docs/clang-tidy/checks/google-build-namespaces.rst b/clang-tools-extra/docs/clang-tidy/checks/google-build-namespaces.rst index 69c01d372cba..ca40f99eef6f 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/google-build-namespaces.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/google-build-namespaces.rst @@ -20,5 +20,5 @@ Options A comma-separated list of filename extensions of header files (the filename extensions should not include "." prefix). Default is "h,hh,hpp,hxx". For header files without an extension, use an empty string (if there are no - other desired extensions) or leave an empty element in the list. e.g., + other desired extensions) or leave an empty element in the list. E.g., "h,hh,hpp,hxx," (note the trailing comma). diff --git a/clang-tools-extra/docs/clang-tidy/checks/google-global-names-in-headers.rst b/clang-tools-extra/docs/clang-tidy/checks/google-global-names-in-headers.rst index 88ba90668f1f..32740eade003 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/google-global-names-in-headers.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/google-global-names-in-headers.rst @@ -17,5 +17,5 @@ Options A comma-separated list of filename extensions of header files (the filename extensions should not contain "." prefix). Default is "h". For header files without an extension, use an empty string (if there are no - other desired extensions) or leave an empty element in the list. e.g., + other desired extensions) or leave an empty element in the list. E.g., "h,hh,hpp,hxx," (note the trailing comma). diff --git a/clang-tools-extra/docs/clang-tidy/checks/llvm-header-guard.rst b/clang-tools-extra/docs/clang-tidy/checks/llvm-header-guard.rst index 58233ecac6ae..b27002ad606a 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/llvm-header-guard.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/llvm-header-guard.rst @@ -13,5 +13,5 @@ Options A comma-separated list of filename extensions of header files (the filename extensions should not include "." prefix). Default is "h,hh,hpp,hxx". For header files without an extension, use an empty string (if there are no - other desired extensions) or leave an empty element in the list. e.g., + other desired extensions) or leave an empty element in the list. E.g., "h,hh,hpp,hxx," (note the trailing comma). diff --git a/clang-tools-extra/docs/clang-tidy/checks/misc-definitions-in-headers.rst b/clang-tools-extra/docs/clang-tidy/checks/misc-definitions-in-headers.rst index 82a5052df986..a1fa09a25ca0 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/misc-definitions-in-headers.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/misc-definitions-in-headers.rst @@ -95,7 +95,7 @@ Options A comma-separated list of filename extensions of header files (the filename extensions should not include "." prefix). Default is "h,hh,hpp,hxx". For header files without an extension, use an empty string (if there are no - other desired extensions) or leave an empty element in the list. e.g., + other desired extensions) or leave an empty element in the list. E.g., "h,hh,hpp,hxx," (note the trailing comma). .. option:: UseHeaderFileExtension diff --git a/clang-tools-extra/docs/clang-tidy/checks/readability-suspicious-call-argument.rst b/clang-tools-extra/docs/clang-tidy/checks/readability-suspicious-call-argument.rst index fd567f331bfd..e1308df15bbc 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/readability-suspicious-call-argument.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/readability-suspicious-call-argument.rst @@ -109,10 +109,10 @@ This heuristic can be configured with :ref:`bounds`. The default bounds are: below `50`\% dissimilar and above `66`\% similar. This heuristic is case-sensitive. -Jaro-Winkler distance (as `JaroWinkler`) +Jaro--Winkler distance (as `JaroWinkler`) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The `Jaro-Winkler distance `_ +The `Jaro--Winkler distance `_ is an edit distance like the Levenshtein distance. It is calculated from the amount of common characters that are sufficiently close to each other in position, and to-be-changed characters. @@ -125,10 +125,10 @@ This heuristic can be configured with :ref:`bounds`. The default bounds are: below `75`\% dissimilar and above `85`\% similar. This heuristic is case-insensitive. -Sørensen-Dice coefficient (as `Dice`) +Sørensen--Dice coefficient (as `Dice`) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The `Sørensen-Dice coefficient `_ +The `Sørensen--Dice coefficient `_ was originally defined to measure the similarity of two sets. Formally, the coefficient is calculated by dividing `2 * #(intersection)` with `#(set1) + #(set2)`, where `#()` is the cardinality function of sets.