mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
lint: Add linter to error on #include <*.cpp>
Files should depend on one another by interface, not by implementation. This checks for quoted includes as well. With practicalswift
This commit is contained in:
parent
a589f536b5
commit
9d6c9dbb88
@ -33,6 +33,14 @@ for CPP_FILE in $(filter_suffix cpp); do
|
||||
fi
|
||||
done
|
||||
|
||||
INCLUDED_CPP_FILES=$(git grep -E "^#include [<\"][^>\"]+\.cpp[>\"]" -- "*.cpp" "*.h")
|
||||
if [[ ${INCLUDED_CPP_FILES} != "" ]]; then
|
||||
echo "The following files #include .cpp files:"
|
||||
echo "${INCLUDED_CPP_FILES}"
|
||||
echo
|
||||
EXIT_CODE=1
|
||||
fi
|
||||
|
||||
EXPECTED_BOOST_INCLUDES=(
|
||||
boost/algorithm/string.hpp
|
||||
boost/algorithm/string/case_conv.hpp
|
||||
|
Loading…
Reference in New Issue
Block a user