aboutsummaryrefslogtreecommitdiff
path: root/contrib/devtools
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-04-11 10:45:45 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-04-11 10:45:47 -0400
commit3cf76c23fbfc8500fa494f8cef8068a67a1388c3 (patch)
tree75489707cc80988098c7281f65758a485597d416 /contrib/devtools
parent6d3de17a226bf50ceb11f7703ace11c285410134 (diff)
parentfad0fc3c9a9759dfb2bb1bdf1aaa5e1d08c0ab9c (diff)
downloadbitcoin-3cf76c23fbfc8500fa494f8cef8068a67a1388c3.tar.xz
Merge #12933: doc: Refine header include policy
fad0fc3c9a Refine travis check for duplicate includes (MarcoFalke) Pull request description: Since there is no harm in having "duplicate" includes and it makes it obvious what are the dependencies of each file, without having to do static analysis or jumping between files, I'd suggest to revert the travis check for duplicate includes. Generally, I think that enforcing minor style preferences should not be done via travis. The cost of maintaining and the burden on other developers is too high. C.f discussion in https://github.com/bitcoin/bitcoin/pull/10973#discussion_r180142594 Tree-SHA512: 97ab0e769d457ccfb873fff6c99613f8b944cd7ef95bfdccb0e1bbe8f5df1f16548c658fa03af42516f806546e75646d338a061e7b057619490235d311ca21f1
Diffstat (limited to 'contrib/devtools')
-rwxr-xr-xcontrib/devtools/lint-includes.sh11
1 files changed, 0 insertions, 11 deletions
diff --git a/contrib/devtools/lint-includes.sh b/contrib/devtools/lint-includes.sh
index baca2f8a1f..f54be46b52 100755
--- a/contrib/devtools/lint-includes.sh
+++ b/contrib/devtools/lint-includes.sh
@@ -19,17 +19,6 @@ for HEADER_FILE in $(filter_suffix h); do
echo
EXIT_CODE=1
fi
- CPP_FILE=${HEADER_FILE/%\.h/.cpp}
- if [[ ! -e $CPP_FILE ]]; then
- continue
- fi
- DUPLICATE_INCLUDES_IN_HEADER_AND_CPP_FILES=$(grep -hE "^#include " <(sort -u < "${HEADER_FILE}") <(sort -u < "${CPP_FILE}") | grep -E "^#include " | sort | uniq -d)
- if [[ ${DUPLICATE_INCLUDES_IN_HEADER_AND_CPP_FILES} != "" ]]; then
- echo "Include(s) from ${HEADER_FILE} duplicated in ${CPP_FILE}:"
- echo "${DUPLICATE_INCLUDES_IN_HEADER_AND_CPP_FILES}"
- echo
- EXIT_CODE=1
- fi
done
for CPP_FILE in $(filter_suffix cpp); do
DUPLICATE_INCLUDES_IN_CPP_FILE=$(grep -E "^#include " < "${CPP_FILE}" | sort | uniq -d)