From 537d93fed52c5c7a406bfbe57cfd1dcf1f50e319 Mon Sep 17 00:00:00 2001 From: Mike Taves Date: Thu, 21 Nov 2024 11:19:55 +1300 Subject: [PATCH 1/2] Add codespell configuration, fix a few other typos --- .codespell.ignore | 7 +++++++ .codespellrc | 2 ++ googlemock/src/gmock-internal-utils.cc | 2 +- googletest/include/gtest/gtest-printers.h | 2 +- googletest/include/gtest/internal/gtest-param-util.h | 2 +- googletest/src/gtest-port.cc | 2 +- 6 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 .codespell.ignore create mode 100644 .codespellrc diff --git a/.codespell.ignore b/.codespell.ignore new file mode 100644 index 0000000000..550af5c313 --- /dev/null +++ b/.codespell.ignore @@ -0,0 +1,7 @@ +afile +assertIn +AtLeast +AtMost +fo +SEH +Seh diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000000..f9d5251257 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,2 @@ +[codespell] +ignore-words = .codespell.ignore diff --git a/googlemock/src/gmock-internal-utils.cc b/googlemock/src/gmock-internal-utils.cc index 96c7e306ec..86e9149eea 100644 --- a/googlemock/src/gmock-internal-utils.cc +++ b/googlemock/src/gmock-internal-utils.cc @@ -162,7 +162,7 @@ GTEST_API_ void Log(LogSeverity severity, const std::string& message, // Prints a GMOCK WARNING marker to make the warnings easily searchable. std::cout << "\nGMOCK WARNING:"; } - // Pre-pends a new-line to message if it doesn't start with one. + // Prepends a new-line to message if it doesn't start with one. if (message.empty() || message[0] != '\n') { std::cout << "\n"; } diff --git a/googletest/include/gtest/gtest-printers.h b/googletest/include/gtest/gtest-printers.h index b2822bcde2..196265a677 100644 --- a/googletest/include/gtest/gtest-printers.h +++ b/googletest/include/gtest/gtest-printers.h @@ -1142,7 +1142,7 @@ void UniversalTersePrint(const T& value, ::std::ostream* os) { // NUL-terminated string. template void UniversalPrint(const T& value, ::std::ostream* os) { - // A workarond for the bug in VC++ 7.1 that prevents us from instantiating + // A workaround for the bug in VC++ 7.1 that prevents us from instantiating // UniversalPrinter with T directly. typedef T T1; UniversalPrinter::Print(value, os); diff --git a/googletest/include/gtest/internal/gtest-param-util.h b/googletest/include/gtest/internal/gtest-param-util.h index cc7ea53173..3a85e58dee 100644 --- a/googletest/include/gtest/internal/gtest-param-util.h +++ b/googletest/include/gtest/internal/gtest-param-util.h @@ -760,7 +760,7 @@ class ParameterizedTestSuiteRegistry { }; // Keep track of what type-parameterized test suite are defined and -// where as well as which are intatiated. This allows susequently +// where as well as which are intatiated. This allows subsequently // identifying suits that are defined but never used. class TypeParameterizedTestSuiteRegistry { public: diff --git a/googletest/src/gtest-port.cc b/googletest/src/gtest-port.cc index 1038ad7bf6..40f05faf88 100644 --- a/googletest/src/gtest-port.cc +++ b/googletest/src/gtest-port.cc @@ -712,7 +712,7 @@ bool RE::PartialMatch(const char* str, const RE& re) { void RE::Init(const char* regex) { pattern_ = regex; - // NetBSD (and Android, which takes its regex implemntation from NetBSD) does + // NetBSD (and Android, which takes its regex implementation from NetBSD) does // not include the GNU regex extensions (such as Perl style character classes // like \w) in REG_EXTENDED. REG_EXTENDED is only specified to include the // [[:alpha:]] style character classes. Enable REG_GNU wherever it is defined From 165d8aec51ea9f5f33f26d1aca7fbdc00ac10e12 Mon Sep 17 00:00:00 2001 From: Mike Taves Date: Thu, 9 Jan 2025 09:51:31 +1300 Subject: [PATCH 2/2] PR feedback, a few other corrections --- .codespell.ignore | 7 ------- .codespellrc | 2 +- googletest/include/gtest/gtest.h | 2 +- googletest/include/gtest/internal/gtest-param-util.h | 2 +- 4 files changed, 3 insertions(+), 10 deletions(-) delete mode 100644 .codespell.ignore diff --git a/.codespell.ignore b/.codespell.ignore deleted file mode 100644 index 550af5c313..0000000000 --- a/.codespell.ignore +++ /dev/null @@ -1,7 +0,0 @@ -afile -assertIn -AtLeast -AtMost -fo -SEH -Seh diff --git a/.codespellrc b/.codespellrc index f9d5251257..47ccc275be 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,2 +1,2 @@ [codespell] -ignore-words = .codespell.ignore +ignore-words-list = afile,assertin,atleast,atmost,fo,rel,seh diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h index c899669520..51a5326f47 100644 --- a/googletest/include/gtest/gtest.h +++ b/googletest/include/gtest/gtest.h @@ -1626,7 +1626,7 @@ class GTEST_API_ AssertHelper { private: // We put our data in a struct so that the size of the AssertHelper class can // be as small as possible. This is important because gcc is incapable of - // re-using stack space even for temporary variables, so every EXPECT_EQ + // reusing stack space even for temporary variables, so every EXPECT_EQ // reserves stack space for another AssertHelper. struct AssertHelperData { AssertHelperData(TestPartResult::Type t, const char* srcfile, int line_num, diff --git a/googletest/include/gtest/internal/gtest-param-util.h b/googletest/include/gtest/internal/gtest-param-util.h index 3a85e58dee..f95dad30a5 100644 --- a/googletest/include/gtest/internal/gtest-param-util.h +++ b/googletest/include/gtest/internal/gtest-param-util.h @@ -771,7 +771,7 @@ class TypeParameterizedTestSuiteRegistry { // Add an instantiation of a suit. void RegisterInstantiation(const char* test_suite_name); - // For each suit repored as defined but not reported as instantiation, + // For each suit reported as defined but not reported as instantiation, // emit a test that reports that fact (configurably, as an error). void CheckForInstantiations();