mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-02 09:15:04 +02:00
doc: Remove confusing assert linter
This commit is contained in:
@@ -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) *\(.*\);",
|
||||
"--",
|
||||
|
||||
Reference in New Issue
Block a user