1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-31 10:24:23 +03:00

🚨 add new CI and fix warnings (#2561)

* ⚗️ move CI targets to CMake
* ♻️ add target for cpplint
* ♻️ add target for self-contained binaries
* ♻️ add targets for iwyu and infer
* 🔊 add version output
* ♻️ add target for oclint
* 🚨 fix warnings
* ♻️ rename targets
* ♻️ use iwyu properly
* 🚨 fix warnings
* ♻️ use iwyu properly
* ♻️ add target for benchmarks
* ♻️ add target for CMake flags
* 👷 use GitHub Actions
* ⚗️ try to install Clang 11
* ⚗️ try to install GCC 11
* ⚗️ try to install Clang 11
* ⚗️ try to install GCC 11
* ⚗️ add clang analyze target
* 🔥 remove Google Benchmark
* ⬆️ Google Benchmark 1.5.2
* 🔥 use fetchcontent
* 🐧 add target to download a Linux version of CMake
* 🔨 fix dependency
* 🚨 fix includes
* 🚨 fix comment
* 🔧 adjust flags for GCC 11.0.0 20210110 (experimental)
* 🐳 user Docker image to run CI
* 🔧 add target for Valgrind
* 👷 add target for Valgrind tests
* ⚗️ add Dart
*  remove Dart
* ⚗️ do not call ctest in test subdirectory
* ⚗️ download test data explicitly
* ⚗️ only execute Valgrind tests
* ⚗️ fix labels
* 🔥 remove unneeded jobs
* 🔨 cleanup
* 🐛 fix OCLint call
*  add targets for offline and git-independent tests
*  add targets for C++ language versions and reproducible tests
* 🔨 clean up
* 👷 add CI steps for cppcheck and cpplint
* 🚨 fix warnings from Clang-Tidy
* 👷 add CI steps for Clang-Tidy
* 🚨 fix warnings
* 🔧 select proper binary
* 🚨 fix warnings
* 🚨 suppress some unhelpful warnings
* 🚨 fix warnings
* 🎨 fix format
* 🚨 fix warnings
* 👷 add CI steps for Sanitizers
* 🚨 fix warnings
*  add optimization to sanitizer build
* 🚨 fix warnings
* 🚨 add missing header
* 🚨 fix warnings
* 👷 add CI step for coverage
* 👷 add CI steps for disabled exceptions and implicit conversions
* 🚨 fix warnings
* 👷 add CI steps for checking indentation
* 🐛 fix variable use
* 💚 fix build
*  remove CircleCI
* 👷 add CI step for diagnostics
* 🚨 fix warning
* 🔥 clean Travis
This commit is contained in:
Niels Lohmann
2021-03-24 07:15:18 +01:00
committed by GitHub
parent 6b74772fe8
commit 6f551930e5
152 changed files with 2494 additions and 12148 deletions

View File

@ -88,9 +88,9 @@ class json_pointer
@complexity Linear in the length of @a ptr.
@sa @ref operator/=(std::string) to append a reference token
@sa @ref operator/=(std::size_t) to append an array index
@sa @ref operator/(const json_pointer&, const json_pointer&) for a binary operator
@sa see @ref operator/=(std::string) to append a reference token
@sa see @ref operator/=(std::size_t) to append an array index
@sa see @ref operator/(const json_pointer&, const json_pointer&) for a binary operator
@since version 3.6.0
*/
@ -112,9 +112,9 @@ class json_pointer
@complexity Amortized constant.
@sa @ref operator/=(const json_pointer&) to append a JSON pointer
@sa @ref operator/=(std::size_t) to append an array index
@sa @ref operator/(const json_pointer&, std::size_t) for a binary operator
@sa see @ref operator/=(const json_pointer&) to append a JSON pointer
@sa see @ref operator/=(std::size_t) to append an array index
@sa see @ref operator/(const json_pointer&, std::size_t) for a binary operator
@since version 3.6.0
*/
@ -134,9 +134,9 @@ class json_pointer
@complexity Amortized constant.
@sa @ref operator/=(const json_pointer&) to append a JSON pointer
@sa @ref operator/=(std::string) to append a reference token
@sa @ref operator/(const json_pointer&, std::string) for a binary operator
@sa see @ref operator/=(const json_pointer&) to append a JSON pointer
@sa see @ref operator/=(std::string) to append a reference token
@sa see @ref operator/(const json_pointer&, std::string) for a binary operator
@since version 3.6.0
*/
@ -156,7 +156,7 @@ class json_pointer
@complexity Linear in the length of @a lhs and @a rhs.
@sa @ref operator/=(const json_pointer&) to append a JSON pointer
@sa see @ref operator/=(const json_pointer&) to append a JSON pointer
@since version 3.6.0
*/
@ -177,11 +177,11 @@ class json_pointer
@complexity Linear in the length of @a ptr.
@sa @ref operator/=(std::string) to append a reference token
@sa see @ref operator/=(std::string) to append a reference token
@since version 3.6.0
*/
friend json_pointer operator/(const json_pointer& ptr, std::string token)
friend json_pointer operator/(const json_pointer& ptr, std::string token) // NOLINT(performance-unnecessary-value-param)
{
return json_pointer(ptr) /= std::move(token);
}
@ -197,7 +197,7 @@ class json_pointer
@complexity Linear in the length of @a ptr.
@sa @ref operator/=(std::size_t) to append an array index
@sa see @ref operator/=(std::size_t) to append an array index
@since version 3.6.0
*/
@ -348,7 +348,7 @@ class json_pointer
}
std::size_t processed_chars = 0;
unsigned long long res = 0;
unsigned long long res = 0; // NOLINT(runtime/int)
JSON_TRY
{
res = std::stoull(s, &processed_chars);
@ -366,7 +366,7 @@ class json_pointer
// only triggered on special platforms (like 32bit), see also
// https://github.com/nlohmann/json/pull/2203
if (res >= static_cast<unsigned long long>((std::numeric_limits<size_type>::max)()))
if (res >= static_cast<unsigned long long>((std::numeric_limits<size_type>::max)())) // NOLINT(runtime/int)
{
JSON_THROW(detail::out_of_range::create(410, "array index " + s + " exceeds size_type", BasicJsonType())); // LCOV_EXCL_LINE
}
@ -398,7 +398,7 @@ class json_pointer
*/
BasicJsonType& get_and_create(BasicJsonType& j) const
{
auto result = &j;
auto* result = &j;
// in case no reference tokens exist, return a reference to the JSON value
// j which will be overwritten by a primitive value