[PATCH] D112356: [NFC] Tidy up spelling, grammar, and inconsistencies in clang-tidy documentation

Salman Javed via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 22 20:29:51 PDT 2021


salman-javed-nz updated this revision to Diff 381702.
salman-javed-nz added a comment.
Herald added subscribers: kbarton, nemanjai.

Replace curly quote characters (‘ ’ “ ”) with standard straight ones (' ").
Replace en-dash (`–`) with standard hyphen (`-`).
In both cases, the latter is used more often in the doc files and is easier to type.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112356/new/

https://reviews.llvm.org/D112356

Files:
  clang-tools-extra/docs/clang-tidy/checks/abseil-no-internal-dependencies.rst
  clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-narrowing-conversions.rst
  clang-tools-extra/docs/clang-tidy/checks/modernize-pass-by-value.rst
  clang-tools-extra/docs/clang-tidy/checks/readability-magic-numbers.rst
  clang-tools-extra/docs/clang-tidy/checks/readability-suspicious-call-argument.rst


Index: clang-tools-extra/docs/clang-tidy/checks/readability-suspicious-call-argument.rst
===================================================================
--- clang-tools-extra/docs/clang-tidy/checks/readability-suspicious-call-argument.rst
+++ clang-tools-extra/docs/clang-tidy/checks/readability-suspicious-call-argument.rst
@@ -109,10 +109,10 @@
 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 <http://en.wikipedia.org/wiki/Jaro–Winkler_distance>`_
+The `Jaro-Winkler distance <http://en.wikipedia.org/wiki/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 @@
 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 <http://en.wikipedia.org/wiki/Sørensen–Dice_coefficient>`_
+The `Sørensen-Dice coefficient <http://en.wikipedia.org/wiki/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.
Index: clang-tools-extra/docs/clang-tidy/checks/readability-magic-numbers.rst
===================================================================
--- clang-tools-extra/docs/clang-tidy/checks/readability-magic-numbers.rst
+++ clang-tools-extra/docs/clang-tidy/checks/readability-magic-numbers.rst
@@ -9,7 +9,7 @@
 Many coding guidelines advise replacing the magic values with symbolic
 constants to improve readability. Here are a few references:
 
-   * `Rule ES.45: Avoid “magic constants”; use symbolic constants in C++ Core Guidelines <https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-magic>`_
+   * `Rule ES.45: Avoid "magic constants"; use symbolic constants in C++ Core Guidelines <https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-magic>`_
    * `Rule 5.1.1 Use symbolic names instead of literal values in code in High Integrity C++ <http://www.codingstandard.com/rule/5-1-1-use-symbolic-names-instead-of-literal-values-in-code/>`_
    * Item 17 in "C++ Coding Standards: 101 Rules, Guidelines and Best
      Practices" by Herb Sutter and Andrei Alexandrescu
Index: clang-tools-extra/docs/clang-tidy/checks/modernize-pass-by-value.rst
===================================================================
--- clang-tools-extra/docs/clang-tidy/checks/modernize-pass-by-value.rst
+++ clang-tools-extra/docs/clang-tidy/checks/modernize-pass-by-value.rst
@@ -124,7 +124,7 @@
 contexts; templated constructors, constructors in class templates, constructors
 of inner classes of template classes, etc., are not transformed. Delayed
 template parsing is enabled by default on Windows as a Microsoft extension:
-`Clang Compiler User’s Manual - Microsoft extensions`_.
+`Clang Compiler User's Manual - Microsoft extensions`_.
 
 Delayed template parsing can be enabled using the `-fdelayed-template-parsing`
 flag and disabled using `-fno-delayed-template-parsing`.
@@ -144,7 +144,7 @@
  +  C(std::string S) : S(std::move(S)) {}
    };
 
-.. _Clang Compiler User’s Manual - Microsoft extensions: https://clang.llvm.org/docs/UsersManual.html#microsoft-extensions
+.. _Clang Compiler User's Manual - Microsoft extensions: https://clang.llvm.org/docs/UsersManual.html#microsoft-extensions
 
 .. seealso::
 
Index: clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-narrowing-conversions.rst
===================================================================
--- clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-narrowing-conversions.rst
+++ clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-narrowing-conversions.rst
@@ -84,7 +84,7 @@
 
 You may have encountered messages like "narrowing conversion from 'unsigned int'
 to signed type 'int' is implementation-defined".
-The C/C++ standard does not mandate two’s complement for signed integers, and so
+The C/C++ standard does not mandate two's complement for signed integers, and so
 the compiler is free to define what the semantics are for converting an unsigned
-integer to signed integer. Clang's implementation uses the two’s complement
+integer to signed integer. Clang's implementation uses the two's complement
 format.
Index: clang-tools-extra/docs/clang-tidy/checks/abseil-no-internal-dependencies.rst
===================================================================
--- clang-tools-extra/docs/clang-tidy/checks/abseil-no-internal-dependencies.rst
+++ clang-tools-extra/docs/clang-tidy/checks/abseil-no-internal-dependencies.rst
@@ -5,7 +5,7 @@
 
 Warns if code using Abseil depends on internal details. If something is in a
 namespace that includes the word "internal", code is not allowed to depend upon
-it because it’s an implementation detail. They cannot friend it, include it,
+it because it's an implementation detail. They cannot friend it, include it,
 you mention it or refer to it in any way. Doing so violates Abseil's
 compatibility guidelines and may result in breakage. See
 https://abseil.io/about/compatibility for more information.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112356.381702.patch
Type: text/x-patch
Size: 5603 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211023/982dc5a7/attachment.bin>


More information about the cfe-commits mailing list