Fix various typos (#1350)
Found via `codespell -q 3 -L alue,alse`
Co-authored-by: Christopher Dunn <cdunn2001@gmail.com>
Co-authored-by: Jordan Bayles <jophba@chromium.org>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2841277..fd8bcf2 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 8d992be..5f5c032 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -77,7 +77,7 @@
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 88a3b12..03f9906 100644
--- a/include/json/writer.h
+++ b/include/json/writer.h
@@ -217,7 +217,7 @@
* - 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 @@
* - 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 b7596e8..3cf66eb 100644
--- a/src/lib_json/CMakeLists.txt
+++ b/src/lib_json/CMakeLists.txt
@@ -142,7 +142,7 @@
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 896bf1b..1ac5e81 100644
--- a/src/lib_json/json_reader.cpp
+++ b/src/lib_json/json_reader.cpp
@@ -1614,7 +1614,7 @@
const auto digit(static_cast<Value::UInt>(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 4e8af0f..a2385fa 100644
--- a/src/test_lib_json/jsontest.h
+++ b/src/test_lib_json/jsontest.h
@@ -74,7 +74,7 @@
/// 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;