From 3f1cb8d13dd07b859fac18419dddbec515e68848 Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Sat, 17 Feb 2024 02:52:06 +0700 Subject: [PATCH] test: add suppression for state.Invalid() which is widely used by cppcheck is unhappy --- test/lint/lint-cppcheck-dash.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/lint/lint-cppcheck-dash.sh b/test/lint/lint-cppcheck-dash.sh index 6d183b5ff6..f677e1f5a7 100755 --- a/test/lint/lint-cppcheck-dash.sh +++ b/test/lint/lint-cppcheck-dash.sh @@ -45,6 +45,8 @@ IGNORED_WARNINGS=( "unusedFunction" "unknownMacro" "unusedStructMember" + "note: Calling function 'Invalid' returns 0" + "[note|warning]: Return value 'state.Invalid(.*)' is always false" ) # We should attempt to update this with all dash specific code @@ -77,8 +79,8 @@ FILES=$(git ls-files -- "src/batchedlogger.*" \ "src/rpc/governance.cpp" \ "src/rpc/masternode.cpp" \ "src/rpc/quorums.cpp" \ - "src/spork.*" \ "src/saltedhasher.*" \ + "src/spork.*" \ "src/stacktraces.*" \ "src/statsd_client.*" \ "src/test/block_reward_reallocation_tests.cpp" \ @@ -88,7 +90,8 @@ FILES=$(git ls-files -- "src/batchedlogger.*" \ "src/test/evo*.cpp" \ "src/test/governance*.cpp" \ "src/wallet/hdchain.*" \ - "src/unordered_lru_cache.h") + "src/unordered_lru_cache.h" \ + ) if ! command -v cppcheck > /dev/null; then