diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-08-21 14:51:16 +0200 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-09-14 18:59:52 +0200 |
commit | fa6e6a3f03a38f8b431bf694268ed344d1815b3b (patch) | |
tree | e42f1c5bb602f595d5a0797bc935052ca94724a0 /test/lint | |
parent | f5c5ddafbcaad7225312cb032b108a3527f0ac0f (diff) | |
download | bitcoin-fa6e6a3f03a38f8b431bf694268ed344d1815b3b.tar.xz |
doc: Remove confusing assert linter
Diffstat (limited to 'test/lint')
-rwxr-xr-x | test/lint/lint-assertions.py | 12 |
1 files changed, 1 insertions, 11 deletions
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) *\(.*\);", "--", |