Merged
Conversation
boost::bind usage was removed in bitcoin#13743. However a new usage snuck in as part of 2bc4c3e (bitcoin#15225).
Contributor
|
ACK c4be50f -- diff looks correct
Linter requested. Linter delivered: new file mode 100755
index 000000000..99d60b58d
--- /dev/null
+++ b/test/lint/lint-cpp.sh
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2018-2020 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#
+# Check for various C++ code patterns we want to avoid.
+
+export LC_ALL=C
+
+EXIT_CODE=0
+
+OUTPUT=$(git grep -E "boost::bind\(" -- "*.cpp" "*.h")
+if [[ ${OUTPUT} != "" ]]; then
+ echo "Use of boost::bind detected. Use std::bind instead."
+ echo
+ echo "${OUTPUT}"
+ EXIT_CODE=1
+fi
+
+exit ${EXIT_CODE}Always happy to lint! |
Member
|
ACK |
Contributor
|
ACK + linter. |
This currently only checks for boost::bind usage. Co-authored-by: practicalswift <[email protected]>
Member
Author
|
C++ linter added as requested. |
Contributor
|
ACK e36f802 -- patch looks correct |
hebasto
approved these changes
Sep 1, 2020
Member
hebasto
left a comment
There was a problem hiding this comment.
ACK e36f802
Result of cherry-picking only the linter commit into the master branch:
$ test/lint/lint-cpp.sh
Use of boost::bind detected. Use std::bind instead.
src/qt/walletmodel.cpp: m_handler_can_get_addrs_changed = m_wallet->handleCanGetAddressesChanged(boost::bind(NotifyCanGetAddressesChanged, this));
| EXIT_CODE=1 | ||
| fi | ||
|
|
||
| exit ${EXIT_CODE} No newline at end of file |
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Aug 21, 2021
This currently only checks for boost::bind usage. Co-authored-by: practicalswift <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

boost::bindusage was removed in #13743. However a new usage snuck in aspart of 2bc4c3e (#15225).