🧰 Adding clang-tidy, cmake-format, and ASAN tests (#168)

* adding clang-tidy and asan tests

Playing with clang-tidy, we already had the rule removed in #166... running the static analyzer from CMake reproduced the report in many places... I suspect the macro and `new`/`delete` separation clang-tidy is just unable to understand.

Running the problematic examples + tests with the ASAN enabled reported no problems

* Apply suggestions from code review

* Update lint.yml

* applying linting rules

* fix bad rename

* formating

* clang-tidy on jsoncons tests

* and cmake-format to lint

* cmake format improve change detection

* Update lint.yml

* apply linting
This commit is contained in:
Chris Mc
2021-09-17 19:42:21 -04:00
committed by GitHub
parent b47d095741
commit 3d501217a3
14 changed files with 142 additions and 85 deletions

View File

@@ -89,12 +89,12 @@ TEST(ClaimTest, SetAlgorithm) {
}
TEST(ClaimTest, AsInt) {
jwt::claim c(picojson::value((int64_t)10));
jwt::claim c(picojson::value(static_cast<int64_t>(10)));
ASSERT_EQ(c.as_int(), 10);
}
TEST(ClaimTest, AsDate) {
jwt::claim c(picojson::value((int64_t)10));
jwt::claim c(picojson::value(static_cast<int64_t>(10)));
ASSERT_EQ(c.as_date(), std::chrono::system_clock::from_time_t(10));
}