aboutsummaryrefslogtreecommitdiff
path: root/test/lint
AgeCommit message (Collapse)Author
2018-06-16Merge #13448: Add linter: Make sure we explicitly open all text files using ↵Wladimir J. van der Laan
UTF-8 encoding in Python c8176b3cc7556d7bcec39a55ae4d6ba16453baaa Add linter: Make sure we explicitly open all text files using UTF-8 or ASCII encoding in Python (practicalswift) 634bd970013eca90f4b4c1f9044eec8c97ba62c2 Explicitly specify encoding when opening text files in Python code (practicalswift) Pull request description: Add linter: Make sure we explicitly open all text files using UTF-8 encoding in Python. As requested by @laanwj in #13440. Tree-SHA512: 1651c00fe220ceb273324abd6703aee504029b96c7ef0e3029145901762c733c9b9d24927da281394fd4681a5bff774336c04eed01fafea997bb32192c334c06
2018-06-14Add linter: Enforce the source code file naming convention described in the ↵practicalswift
developer notes
2018-06-12Add linter: Make sure we explicitly open all text files using UTF-8 or ASCII ↵practicalswift
encoding in Python
2018-06-12Explicitly specify encoding when opening text files in Python codepracticalswift
2018-06-12Merge #13120: policy: Treat segwit as always activeWladimir J. van der Laan
fa7a6cf1b36284db70e941bd2915fd6edbb0f9d6 policy: Treat segwit as always active (MarcoFalke) Pull request description: Now that segwit is active for a long time, there is no need to reject transactions with the reason that segwit hasn't activated. Strictly speaking, this is a bug fix, because with the release of 0.16, we create segwit transactions in our wallet by default without checking if they are allowed by local policy. More broadly, this simplifies the code as if "premature witness" was always set to true with the corresponding command line args. Tree-SHA512: 484c26aa3a66faba6b41e8554a91a29bfc15fbf6caae3d5363a3966283143189c4bd5333a610b0669c1238f75620691264e73f6b9f1161cdacf7574d946436da
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-07Merge #13041: build: Add linter checking for accidental introduction of ↵Wladimir J. van der Laan
locale dependence 698cfd081144845f6246171b8a2a0cfa8daaecdb docs: Mention lint-locale-dependence.sh in developer-notes.md (practicalswift) 0a4ea2f4589961868ab4d25e0277485c31938e20 build: Add linter for checking accidental locale dependence (practicalswift) Pull request description: This linter will check for code accidentally introducing locale dependencies. Unnecessary locale dependence can cause bugs that are very tricky to isolate and fix. We should avoid using locale dependent functions if possible. Context: https://github.com/bitcoin/bitcoin/pull/12881#issuecomment-378564722 Example output: ``` $ contrib/devtools/lint-locale-dependence.sh The locale dependent function tolower(...) appears to be used: src/init.cpp: if (s[0] == '0' && std::tolower(s[1]) == 'x') { Unnecessary locale dependence can cause bugs that are very tricky to isolate and fix. Please avoid using locale dependent functions if possible. Advice not applicable in this specific case? Add an exception by updating the ignore list in contrib/devtools/lint-locale-dependence.sh ``` **Note to reviewers:** What is the most appropriate `LOCALE_DEPENDENT_FUNCTIONS` function list? What should be added or removed? Tree-SHA512: 14e448828804bb02bf59070647e38b52fce120c700c903a4a8472769a2cee5dd529bd3fc182386993cb8720482cf4250b63a0a477db61b941ae4babe5c65025f
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-06build: Add linter for checking accidental locale dependencepracticalswift
2018-06-04build: Guard against accidental introduction of new Boost dependenciespracticalswift
2018-05-29policy: Treat segwit as always activeMarcoFalke
2018-05-24test: Move linters to test/lint, add readmeMarcoFalke