From a1f1613bdd81bf28289e8d3fbeb4eb78b82fb203 Mon Sep 17 00:00:00 2001 From: luzpaz Date: Tue, 14 Dec 2021 21:04:47 -0500 Subject: [PATCH] Fix various typos (#1350) Found via `codespell -q 3 -L alue,alse` Co-authored-by: Christopher Dunn Co-authored-by: Jordan Bayles --- CMakeLists.txt | 2 +- CONTRIBUTING.md | 2 +- include/json/writer.h | 4 ++-- src/lib_json/CMakeLists.txt | 2 +- src/lib_json/json_reader.cpp | 2 +- src/test_lib_json/jsontest.h | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2841277c0..fd8bcf2b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ # policies that provide successful builds. By setting JSONCPP_NEWEST_VALIDATED_POLICIES_VERSION # to a value greater than the oldest policies, all policies between # JSONCPP_OLDEST_VALIDATED_POLICIES_VERSION and CMAKE_VERSION (used for this build) -# are set to their NEW behaivor, thereby suppressing policy warnings related to policies +# are set to their NEW behavior, thereby suppressing policy warnings related to policies # between the JSONCPP_OLDEST_VALIDATED_POLICIES_VERSION and CMAKE_VERSION. # # CMake versions greater than the JSONCPP_NEWEST_VALIDATED_POLICIES_VERSION policies will diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8d992bee7..5f5c032a8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -77,7 +77,7 @@ See `doxybuild.py --help` for options. To add a test, you need to create two files in test/data: * a `TESTNAME.json` file, that contains the input document in JSON format. -* a `TESTNAME.expected` file, that contains a flatened representation of the +* a `TESTNAME.expected` file, that contains a flattened representation of the input document. The `TESTNAME.expected` file format is as follows: diff --git a/include/json/writer.h b/include/json/writer.h index 88a3b12e9..03f99065f 100644 --- a/include/json/writer.h +++ b/include/json/writer.h @@ -217,7 +217,7 @@ class JSON_API FastWriter * - otherwise, it the values do not fit on one line, or the array contains * object or non empty array, then print one value per line. * - * If the Value have comments then they are outputed according to their + * If the Value have comments then they are outputted according to their *#CommentPlacement. * * \sa Reader, Value, Value::setComment() @@ -286,7 +286,7 @@ class JSON_API * - otherwise, it the values do not fit on one line, or the array contains * object or non empty array, then print one value per line. * - * If the Value have comments then they are outputed according to their + * If the Value have comments then they are outputted according to their #CommentPlacement. * * \sa Reader, Value, Value::setComment() diff --git a/src/lib_json/CMakeLists.txt b/src/lib_json/CMakeLists.txt index b7596e80b..3cf66eb34 100644 --- a/src/lib_json/CMakeLists.txt +++ b/src/lib_json/CMakeLists.txt @@ -142,7 +142,7 @@ if(BUILD_STATIC_LIBS) set(STATIC_LIB ${PROJECT_NAME}_static) add_library(${STATIC_LIB} STATIC ${PUBLIC_HEADERS} ${JSONCPP_SOURCES}) - # avoid name clashes on windows as the shared import lib is alse named jsoncpp.lib + # avoid name clashes on windows as the shared import lib is also named jsoncpp.lib if(NOT DEFINED STATIC_SUFFIX AND BUILD_SHARED_LIBS) if (MSVC) set(STATIC_SUFFIX "_static") diff --git a/src/lib_json/json_reader.cpp b/src/lib_json/json_reader.cpp index 896bf1b91..1ac5e81ab 100644 --- a/src/lib_json/json_reader.cpp +++ b/src/lib_json/json_reader.cpp @@ -1614,7 +1614,7 @@ bool OurReader::decodeNumber(Token& token, Value& decoded) { const auto digit(static_cast(c - '0')); if (value >= threshold) { // We've hit or exceeded the max value divided by 10 (rounded down). If - // a) we've only just touched the limit, meaing value == threshold, + // a) we've only just touched the limit, meaning value == threshold, // b) this is the last digit, or // c) it's small enough to fit in that rounding delta, we're okay. // Otherwise treat this number as a double to avoid overflow. diff --git a/src/test_lib_json/jsontest.h b/src/test_lib_json/jsontest.h index 4e8af0f25..a2385fa3f 100644 --- a/src/test_lib_json/jsontest.h +++ b/src/test_lib_json/jsontest.h @@ -74,7 +74,7 @@ class TestResult { /// Removes the last PredicateContext added to the predicate stack /// chained list. - /// Next messages will be targed at the PredicateContext that was removed. + /// Next messages will be targeted at the PredicateContext that was removed. TestResult& popPredicateContext(); bool failed() const;