diff --git a/.clang-tidy b/.clang-tidy index 2eabca240..0c0689e39 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -11,6 +11,13 @@ Checks: > -performance-inefficient-string-concatenation, -performance-unnecessary-value-param, portability-*, + readability-*, + -readability-braces-around-statements, + -readability-else-after-return, + -readability-implicit-bool-conversion, + -readability-magic-numbers, + -readability-named-parameter, + -readability-qualified-auto, WarningsAsErrors: '*' FormatStyle: file \ No newline at end of file diff --git a/test/spectests/spectests.cpp b/test/spectests/spectests.cpp index 02430dea2..e5f4fe759 100644 --- a/test/spectests/spectests.cpp +++ b/test/spectests/spectests.cpp @@ -559,9 +559,9 @@ class test_runner std::cout << "SKIPPED " << message << "\n"; } - void log(std::string_view message) const { std::cout << message << "\n"; } + static void log(std::string_view message) { std::cout << message << "\n"; } - void log_no_newline(std::string_view message) const { std::cout << message << std::flush; } + static void log_no_newline(std::string_view message) { std::cout << message << std::flush; } test_settings m_settings; std::unordered_map> m_instances; diff --git a/test/utils/asserts.hpp b/test/utils/asserts.hpp index 79ff67469..9861d2924 100644 --- a/test/utils/asserts.hpp +++ b/test/utils/asserts.hpp @@ -8,7 +8,7 @@ #include #include -MATCHER(Traps, "") +MATCHER(Traps, "") // NOLINT(readability-redundant-string-init) { return arg.trapped; } @@ -18,7 +18,7 @@ MATCHER(Result, "empty result") return !arg.trapped && arg.stack.size() == 0; } -MATCHER_P(Result, value, "") +MATCHER_P(Result, value, "") // NOLINT(readability-redundant-string-init) { return !arg.trapped && arg.stack.size() == 1 && arg.stack[0] == uint64_t(value); } diff --git a/test/utils/wabt_engine.cpp b/test/utils/wabt_engine.cpp index 5eeffac02..64d1ba6b4 100644 --- a/test/utils/wabt_engine.cpp +++ b/test/utils/wabt_engine.cpp @@ -87,10 +87,7 @@ bool WabtEngine::instantiate(bytes_view wasm_binary) // Run start function (this will return ok if no start function is present) const wabt::interp::ExecResult r = m_executor.RunStartFunction(m_module); - if (r.result != wabt::interp::Result::Ok) - return false; - - return true; + return r.result == wabt::interp::Result::Ok; } bool WabtEngine::init_memory(bytes_view memory)