From fa6e6a3f03a38f8b431bf694268ed344d1815b3b Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Mon, 21 Aug 2023 14:51:16 +0200 Subject: doc: Remove confusing assert linter --- test/lint/lint-assertions.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'test/lint') diff --git a/test/lint/lint-assertions.py b/test/lint/lint-assertions.py index 6da59b0d48..d9f86b22b8 100755 --- a/test/lint/lint-assertions.py +++ b/test/lint/lint-assertions.py @@ -23,20 +23,10 @@ def git_grep(params: [], error_msg: ""): def main(): - # PRE31-C (SEI CERT C Coding Standard): - # "Assertions should not contain assignments, increment, or decrement operators." - exit_code = git_grep([ - "-E", - r"[^_]assert\(.*(\+\+|\-\-|[^=!<>]=[^=!<>]).*\);", - "--", - "*.cpp", - "*.h", - ], "Assertions should not have side effects:") - # Aborting the whole process is undesirable for RPC code. So nonfatal # checks should be used over assert. See: src/util/check.h # src/rpc/server.cpp is excluded from this check since it's mostly meta-code. - exit_code |= git_grep([ + exit_code = git_grep([ "-nE", r"\<(A|a)ss(ume|ert) *\(.*\);", "--", -- cgit v1.2.3