aboutsummaryrefslogtreecommitdiff
path: root/test/lint/lint-includes.sh
AgeCommit message (Collapse)Author
2020-07-31[build] msvc: add boost::processSjors Provoost
* AppVeyor boost-process vcpkg package. * Tell Boost linter to ignore it * Add HAVE_BOOST_PROCESS for MSVC build (bitcoin_config.h)
2020-07-01gui: change combiner for signals to optional_last_valueCory Fields
optional_last_value, which does not throw, has replaced optional_value as boost's default combiner. Besides being better supported, it also doesn't trigger gcc's -Wmaybe-unitialized warning, presumably because exceptions no longer bubble-up out of signals: ```bash boost/signals2/last_value.hpp:54:36: warning: '*((void*)& value +1)' may be used uninitialized in this function [-Wmaybe-uninitialized] if(value) return value.get(); ``` The change in default happened in Boost 1.39.0 (along with the introduction of the signals 2 library. More information is available here: https://www.boost.org/doc/libs/1_73_0/doc/html/signals2/rationale.html#id-1.3.36.9.4 and here: https://www.boost.org/doc/libs/1_73_0/doc/html/boost/signals2/optional_last_value.html Co-authored-by: fanquake <fanquake@gmail.com>
2020-06-04refactor: Specify boost/thread/thread.hpp explicitlyHennadii Stepanov
2020-04-16scripted-diff: Bump copyright headersMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-03-06scheduler: switch from boost to stdAnthony Towns
Changes from boost::chrono to std::chrono, boost::condition_var to std::condition_var, boost::mutex to sync.h Mutex, and reverselock.h to sync.h REVERSE_LOCK. Also adds threadsafety annotations to CScheduler members.
2020-01-28test: Add crc32c exception to various linters and generation scriptsWladimir J. van der Laan
2019-12-30scripted-diff: Bump copyright of files changed in 2019MarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2019-09-04Make lint-includes.sh work from any directoryKristaps Kaupe
2018-10-20scripted-diff: Replace boost::bind with std::bindChun Kuan Lee
-BEGIN VERIFY SCRIPT- for j in $(seq 1 5) do sed -i "s/ _${j}/ std::placeholders::_${j}/g" $(git grep --name-only " _${j}" -- '*.cpp' '*.h') done sed -i "s/boost::bind/std::bind/g" $(git grep --name-only boost::bind -- '*.cpp' '*.h') sed -i "s/boost::ref/std::ref/g" $(git grep --name-only boost::ref -- '*.cpp' '*.h') sed -i '/boost\/bind/d' $(git grep --name-only boost/bind) -END VERIFY SCRIPT-
2018-09-23Make fs::path::string() always return utf-8 stringChun Kuan Lee
2018-09-11Merge #13734: gui: Drop boost::scoped_array and use wchar_t API explicitly ↵Wladimir J. van der Laan
on Windows bb6ca65f9890e8280ace32de5a37774e14705859 gui: get special folder in unicode (Chun Kuan Lee) 1c5d22585384c8bb05a27a04eab5c57b31d623fb Drop boost::scoped_array (Chun Kuan Lee) Pull request description: Drop boost::scoped_array and simplify the code. `TCHAR` should be defined as `wchar_t` if `UNICODE` is defined. So we can use `.toStdWString().c_str()` to get wchar_t C-style string. Fix #13819 Tree-SHA512: 3fd4aa784129c9d1576b01e6ee27faa42d793e152d132f2dde504d917dad3a8e95e065fcbc54a3895d74fb6b2a9ed4f5ec67d893395552f585e225486a84a454
2018-08-29Merge #13671: Remove the boost/algorithm/string/case_conv.hpp dependencyWladimir J. van der Laan
b193d5a443bfd994936ad21b807b2bb37756ef2c Removes the Boost case_conv.hpp dependency. (251) 7a208d9fade56e2347891daff2f6b903923c9d50 Implements custom tolower and toupper functions. (251) e2ba043b8d852d3f465bc293d6e494c8c6f75dfd Implements ParseNetwork unit test. (251) Pull request description: This pull request removes the `boost/algorithm/string/case_conv.hpp` dependency from the project. `boost/algorithm/string/case_conv.hpp` is included for the `boost::to_lower` and `boost::to_upper` template functions. We can replace the calls to these functions with straightforward alternative implementations that use the C++ Standard Library, because the functions are called with `std::string` objects that use standard 7-bit ASCII characters as argument. The refactored implementation should work without the explicit `static_cast<unsigned char>` cast and `unsigned char` lambda return type. Both have been added defensively and to be explicit. Especially in case of the former, behaviour is undefined (potentially result in a crash) if the `std::toupper` argument is not an `unsigned char`. A potential alternative, maybe even preferred, implementation to address the `boost::to_lower` function call in `ParseNetwork(std::string)` could have been: ```c++ if (net == "ipv4" || net == "IPv4") return NET_IPV4; if (net == "ipv6" || net == "IPv6") return NET_IPV6; ``` This alternative implementation would however change the external behaviour of `ParseNetwork(std::string)`. This pull requests includes a unit test to validate the implementation of `ParseNetwork(std::string)` prior and after the removal of the `case_conv.hpp` dependency. `boost/algorithm/string/case_conv.hpp` has been removed from the `EXPECTED_BOOST_INCLUDES` in `test/lint/lint-includes.sh` because it is no longer required. Tree-SHA512: d803ae709f2368a3efb223097384a722436955bce0c44a1a5cffd0abb3164be0cce85ba0e9ebd9408166df3f1a95ea0c0d29e3a2534af2fae206c0419d67fde9
2018-08-28Removes the Boost case_conv.hpp dependency.251
This commit removes the `boost/algorithm/string/case_conv.hpp` dependency from the project. It replaces the `boost::to_lower` and `boost::to_upper` functions with custom functions that are locale independent and ASCII deterministic.
2018-08-28add unicode compatible file_lock for WindowsChun Kuan Lee
boost::interprocess::file_lock cannot open the files that contain characters which cannot be parsed by the user's code page on Windows. This commit add a new class to handle those specific file for Windows.
2018-08-04Drop boost::scoped_arrayChun Kuan Lee
2018-07-22Removes Boost predicate.hpp dependency251
This is a squashed commit that squashes the following commits: This commit removes the `boost/algorithm/string/predicate.hpp` dependenc from the project by replacing the function calls to `boost::algorithm::starts_with` `boost::algorithm::ends_with` and `all` with respectively C++11' `std::basic_string::front`, `std::basic_string::back`, `std::all_of` function calls This commit replaces `boost::algorithm::is_digit` with a locale independent isdigi function, because the use of the standard library's `isdigit` and `std::isdigit functions is discoraged in the developer notes
2018-07-21Removes the boost/algorithm/string/join dependency251
This commit removes the `boost/algorithm/string/join` dependency from the project by replacing `boost::algorithm::join` with a simple helper function.
2018-07-20Merge #13482: Remove boost::program_options dependencyWladimir J. van der Laan
f447a0a7079619f0d650084df192781cca9fd826 Remove program options from build system (Chun Kuan Lee) 11588c639e8912f1b28e981c1a2a0e4306dbd093 Replace boost program_options (Chun Kuan Lee) Pull request description: Concept from #12744, but without parsing negated options. Tree-SHA512: 7f418744bb8934e313d77a5f162633746ef5d043de802b9c9cd9f7c1842e7e566eb5f171cd9e2cc13317281b2449c6fbd553fa4f09b837e6af2f5d2b2aabdca2
2018-07-18Remove program options from build systemChun Kuan Lee
2018-06-27Remove boost dependency (boost/assign/std/vector.hpp)practicalswift
2018-06-20Obsolete #!/bin/bash shebangDesWurstes
2018-06-14Add "export LC_ALL=C" to all shell scriptspracticalswift
2018-06-11Merge #13230: Simplify include analysis by enforcing the developer guide's ↵Wladimir J. van der Laan
include syntax 16e3cd380af570fb2f656e0344bab88829a4bcda Clarify include recommendation (practicalswift) 6d10f43738d58bf623975e3124fd5735aac7d3e1 Enforce the use of bracket syntax includes ("#include <foo.h>") (practicalswift) 906bee8e5f474f8718d02e6f1938f20dcfe3d2cc Use bracket syntax includes ("#include <foo.h>") (practicalswift) Pull request description: When analysing includes in the project it is often assumed that the preferred bracket include syntax (`#include <foo.h>`) mentioned in `developer-docs.md` is used consistently. @sipa:s excellent circular dependencies script [`circular-dependencies.py`](https://github.com/sipa/bitcoin/blob/50c69b78011c1bc55885ebfd216db60ed490ebea/contrib/devtools/circular-dependencies.py) (#13228) is an example of a script making this reasonable assumption. This PR enables automatic Travis checking of the include syntax making sure that the bracket syntax includes (`#include <foo.h>`) is used consistently. Tree-SHA512: a414921aabe8e487ebed42f3f1cbd02fecd1add385065c1f2244cd602c31889e61fea5a801507ec501ef9bd309b05d3c999f915cec1c2b44f085bb0d2835c182
2018-06-06lint: Add linter to error on #include <*.cpp>Ben Woosley
Files should depend on one another by interface, not by implementation. This checks for quoted includes as well. With practicalswift
2018-06-06Enforce the use of bracket syntax includes ("#include <foo.h>")practicalswift
2018-06-04build: Guard against accidental introduction of new Boost dependenciespracticalswift
2018-05-24test: Move linters to test/lint, add readmeMarcoFalke