mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-09 10:43:19 -05:00
test: Make linter to look for BOOST_ASSERT
macros
The `BOOST_ASSERT` macro requires to `#include boost/assert.hpp`.
This commit is contained in:
parent
47fe551e52
commit
28fff06afe
1 changed files with 10 additions and 0 deletions
|
@ -45,6 +45,16 @@ def main():
|
||||||
":(exclude)src/rpc/server.cpp",
|
":(exclude)src/rpc/server.cpp",
|
||||||
], "CHECK_NONFATAL(condition) or NONFATAL_UNREACHABLE should be used instead of assert for RPC code.")
|
], "CHECK_NONFATAL(condition) or NONFATAL_UNREACHABLE should be used instead of assert for RPC code.")
|
||||||
|
|
||||||
|
# The `BOOST_ASSERT` macro requires to `#include boost/assert.hpp`,
|
||||||
|
# which is an unnecessary Boost dependency.
|
||||||
|
exit_code |= git_grep([
|
||||||
|
"-E",
|
||||||
|
r"BOOST_ASSERT *\(.*\);",
|
||||||
|
"--",
|
||||||
|
"*.cpp",
|
||||||
|
"*.h",
|
||||||
|
], "BOOST_ASSERT must be replaced with Assert, BOOST_REQUIRE, or BOOST_CHECK.")
|
||||||
|
|
||||||
sys.exit(exit_code)
|
sys.exit(exit_code)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue