aboutsummaryrefslogtreecommitdiff
path: root/test/lint
AgeCommit message (Collapse)Author
2022-04-20Merge bitcoin/bitcoin#24895: lint: Convert lint-includes.sh to PythonMarcoFalke
67b41678c8284715c9cf96d6bdbde9a072b7a904 lint: Convert lint-includes.sh to Python (Dimitri) Pull request description: A port of `test/lint/lint-includes.sh` to a Python-script as part of the request of #24783. Checked for output-consistency. ACKs for top commit: KevinMusgrave: Tested ACK 67b41678c8284715c9cf96d6bdbde9a072b7a904 Tree-SHA512: 05b4b114dc101e571004aee8aea1480e4dda1dc645426100649e9cb81e56e8667f88d6d5646a9860ea1c7abc36754eda2a77ec10156c54b62db00e2c00b8ceae
2022-04-20lint: convert submodule linter test to PythonEunoia
2022-04-19lint: Convert lint-includes.sh to PythonDimitri
2022-04-18Merge bitcoin/bitcoin#24794: lint: Convert Python linter to Pythonlaanwj
47b66ac4acd148da9fd0d894574f8bb3b3b33368 lint: Convert Python linter to Python (Fabian Jahr) Pull request description: The outputs provided by the Python version should be exactly the same as the ones from the shell version. There is small improvement here: Previously only the dependency of `flake9` was checked, now all dependencies are checked before running. I also tried to mostly follow the [recommendations here](https://github.com/bitcoin/bitcoin/pull/24766#pullrequestreview-932953476) but happy to make more changes if there is still room for improvement. ACKs for top commit: laanwj: Tested ACK 47b66ac4acd148da9fd0d894574f8bb3b3b33368 Tree-SHA512: 1630188e176c1063b8905669b76682b361a858cde6990ab17e51ad4333bf376eab796050cdb9f2967b84f1f74379d9e860c4258561b1964e1a47183c593e5bb4
2022-04-18Merge bitcoin/bitcoin#24853: lint: Convert lint-git-commit-check.sh to Pythonlaanwj
f27fcd9bf4d667f78055d4b3ee6f426e4c5ffe16 lint: Convert lint-git-commit-check.sh to Python (Dimitri) Pull request description: A port of `/test/lint/lint-git-commit-check.sh` to a Python-script as part of the request of #24783 . Checked for output-consistency. ACKs for top commit: laanwj: re-ACK f27fcd9bf4d667f78055d4b3ee6f426e4c5ffe16 Tree-SHA512: afc4a662f4aec1796c023b98a875c1591940ecdfc709eefe2df29d33e51e807c3c2e2b5c410aa3ad1cd3f6f8207f5c15b638637ff9f5659cafa7543bbe8a0bae
2022-04-18Merge bitcoin/bitcoin#24844: lint: Convert lint-whitespace.sh to Pythonlaanwj
a75f6d86d1bd21a79cbbe141274f04aa4365985e lint: Convert lint-whitespace.sh to Python (Dimitri) Pull request description: A port of `/test/lint/lint-whitespace.sh` to a Python-script as part of the request of #24783 . Checked for output-consistency. ACKs for top commit: laanwj: Code review and tested ACK a75f6d86d1bd21a79cbbe141274f04aa4365985e Tree-SHA512: 982041b0beb1b3866493ad523950c9a536a8b1ec79b773fe86dbc1166844c13a30b384e92025f845d45d25334f90f3abda5fa23f0f28e7c2cddc5e496f84c445
2022-04-18lint: Convert Python linter to PythonFabian Jahr
2022-04-16lint: Convert lint-whitespace.sh to PythonDimitri
2022-04-16lint: Convert lint-git-commit-check.sh to PythonDimitri
2022-04-15Converted lint-tests.sh to pythonTakeshiMusgrave
Use raw string Use re.search instead of grep in check_matching_test_names Replaced bash commands in check_unique_test_names with python commands Use set and sort output Use set comprehension Use .splitlines() Call grep_boost_fixture_test_suite once splitlines() once Fixed copyright date Use check_output() instead of run() add encoding='utf8' Use clearer code for getting duplicates
2022-04-13lint: convert format strings linter test to pythonEunoia
2022-04-08Converted lint-python-mutable-default-parameters.sh to pythonTakeshiMusgrave
Change permission Change argument so that it's compatiable with python 3.6 Change comment to docstring Remove .split, .append, .extend calls. Remove 'output' variable assignment
2022-04-06lint: remove qt SIGNAL/SLOT lintfanquake
I think we are past the point where we need to lint for this, the CPU can probably be better utilized.
2022-04-06lint: remove boost::bind linterfanquake
I don't think we need to maintain a linter for reintroducing boost::bind at this point.
2022-04-06Merge bitcoin/bitcoin#24766: lint: convert spellchecking lint test to pythonMarcoFalke
4685463301a1c64c1be07725059cc94d69db104b doc: Update lint test docs (Fabian Jahr) 77f98df41f032d6846f8309c0b1f239e9dbc0da3 lint: convert spell check lint test to python (Fabian Jahr) Pull request description: The new python version should produce the exact same output as the bash version but be easier to maintain. ACKs for top commit: MarcoFalke: cr ACK 4685463301a1c64c1be07725059cc94d69db104b Tree-SHA512: 242b802b750b42b299b93d1de4bcf17d92ad0a633d31894145d8590782a1db1041de59a283f133a4f75898d95444eb3c842005a6aa5cb919543625addad596d8
2022-04-06lint: Convert Python dead code linter to PythonFabian Jahr
2022-04-06lint: convert spell check lint test to pythonFabian Jahr
2022-04-14lint: Convert lint-logs.sh to PythonDimitri
2022-04-04lint: Start to use py lint scriptsMarcoFalke
2022-04-04Move lint script and data file to avoid lint- prefixMarcoFalke
This is needed for the next commit
2022-02-23Merge bitcoin/bitcoin#24409: Always output license/copyright info with ↵MarcoFalke
`-version` 5a89bed410d724360b8f90bd9d7d28d6e62331c0 contrib: address gen-manpages feedback from #24263 (fanquake) 2618fb8d15d01dca967856c92ebf3e4cc09699a2 Output license info when binaries are passed -version (fanquake) 4c3e3c57463b029d335e685d3dcdaf26456666cf refactor: shift CopyrightHolders() and LicenseInfo() to clientversion.cpp (fanquake) Pull request description: Addresses a review comment from #24263, and addresses the [comment](https://github.com/bitcoin/bitcoin/pull/24263#issuecomment-1030582925) where it was pointed out that we are inconsistent with emitting our copyright. After this change, the copyright is always emitted with `-version`, rather than `-help`, i.e: ```bash bitcoind -version Bitcoin Core version v22.99.0-fc1f355913f6-dirty Copyright (C) 2009-2022 The Bitcoin Core developers Please contribute if you find Bitcoin Core useful. Visit <https://bitcoincore.org/> for further information about the software. The source code is available from <https://github.com/bitcoin/bitcoin>. This is experimental software. Distributed under the MIT software license, see the accompanying file COPYING or <https://opensource.org/licenses/MIT> ``` The info is also added to binaries other than `bitcoind`/`bitcoin-qt`. This change also prevents duplicate copyright info appearing in the `bitcoind` man page. ACKs for top commit: laanwj: Tested ACK 5a89bed410d724360b8f90bd9d7d28d6e62331c0 Tree-SHA512: 0ac2a1adf9e9de0c3206f35837008e3f93eaf15b193736203d71609273f0887cca20b8a90972cb9f941ebd62b330d61a0cbb5fb1b7a7f2dbc715ed8a0c1569d9
2022-02-22lint: remove no-longer used exceptions from lint-format-strings.pyfanquake
2022-02-22refactor: shift CopyrightHolders() and LicenseInfo() to clientversion.cppfanquake
2022-02-13build: use header-only Boost unit testfanquake
2022-02-03refactor: replace boost::filesystem with std::filesystemKiminuo
Warning: Replacing fs::system_complete calls with fs::absolute calls in this commit may cause minor changes in behaviour because fs::absolute no longer strips trailing slashes; however these changes are believed to be safe. Co-authored-by: Russell Yanofsky <russ@yanofsky.org> Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2022-01-30lint: add creat and ba into ignore-words for lint-spellingbrunoerg
2022-01-24Merge bitcoin/bitcoin#23543: test: Prevent non-compatible sed binary for ↵MarcoFalke
scripted-diffs d8dfc403f74858b79c87f650b5d609aa60a4dc3b script: redirecting stderr to stdout before pipelining into grep (anouar kappitou) 30df5c3dd4d39d9027b0341d01d3233400104893 script: preventing non-compatible sed binary. (anouar kappitou) Pull request description: This Pull request improve scripted diff by checking for non-compatible sed binary. Fixes #19815 ACKs for top commit: shaavan: reACK d8dfc403f74858b79c87f650b5d609aa60a4dc3b theStack: Tested ACK d8dfc403f74858b79c87f650b5d609aa60a4dc3b Tree-SHA512: 4813abb02195e04b8953662e51cba4599789e6185a6d384f56255e2d37c2b16be46c7c8861e44ba1a13d42573a58eb708901472925cb308dba2f602020e9f0f6
2022-01-22script: redirecting stderr to stdout before pipelining into grepanouar kappitou
Co-authored-by: Sebastian Falbesoner <sebastian.falbesoner@gmail.com>
2022-01-11util: Restore GetIntArg saturating behaviorJames O'Beirne
The new locale-independent atoi64 method introduced in #20452 parses large integer values higher than maximum representable value as 0 instead of the maximum value, which breaks backwards compatibility. This commit restores compatibility and adds test coverage for this case in terms of the related GetIntArg and strtoll functions. Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
2021-12-30scripted-diff: Insert missed copyright headersHennadii Stepanov
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py insert contrib/guix/libexec/build.sh ./contrib/devtools/copyright_header.py insert contrib/guix/libexec/codesign.sh ./contrib/devtools/copyright_header.py insert contrib/tracing/log_raw_p2p_msgs.py ./contrib/devtools/copyright_header.py insert contrib/tracing/log_utxocache_flush.py ./contrib/devtools/copyright_header.py insert contrib/tracing/p2p_monitor.py ./contrib/devtools/copyright_header.py insert test/lint/lint-files.sh -END VERIFY SCRIPT-
2021-12-30scripted-diff: Bump copyright headersHennadii Stepanov
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT- Commits of previous years: * 2020: fa0074e2d82928016a43ca408717154a1c70a4db * 2019: aaaaad6ac95b402fe18d019d67897ced6b316ee0
2021-12-01Merge bitcoin/bitcoin#22677: cut the validation <-> txmempool circular ↵MarcoFalke
dependency 2/2 a64078e38563ef3ac5e5ec20c07569441c87eeee Break validation <-> txmempool circular dependency (glozow) 64e4963c635ec3a73a5fa3f32f6ec08e70609f60 [mempool] always assert coin spent (glozow) bb9078ed51159fa162484f16993313ed6cf980e3 [refactor] put finality and maturity checking into a lambda (glozow) bedf246f1e2497a3641093c6e8fa11fb34dddac4 [mempool] only update lockpoints for non-removed entries (glozow) 1b3a11e126b258fba975ed7c452221608f2c5472 MOVEONLY: TestLockPointValidity to txmempool (glozow) Pull request description: Remove 2 circular dependencies: validation - txmempool and validation - policy/rbf - txmempool Validation should depend on txmempool (e.g. `CChainstateManager` has a mempool and we often need to know what's in our mempool to validate transactions), but txmempool is a data structure that shouldn't really need to know about chain state. - Changes `removeForReorg()` to be parameterized by a callable that returns true/false (i.e. whether the transaction should be removed due to being now immature or nonfinal) instead of a `CChainState`. The mempool really shouldn't need to know about coinbase maturity or lockpoints, it just needs to know which entries to remove. ACKs for top commit: laanwj: Code review ACK a64078e38563ef3ac5e5ec20c07569441c87eeee mjdietzx: reACK a64078e38563ef3ac5e5ec20c07569441c87eeee theStack: re-ACK a64078e38563ef3ac5e5ec20c07569441c87eeee Tree-SHA512: f75995200569c09dfb8ddc09729da66ddb32167ff1e8a7e72f105ec062d2d6a9a390e6b4a2a115e7ad8ad3525f891ee1503f3cd2bed11773abcaf7c3230b1136
2021-11-30Merge bitcoin/bitcoin#23506: test: Make more shell scripts verifiable by the ↵W. J. van der Laan
`shellcheck` tool a3f61676e83e908da67664c6163db61d1d11c5d2 test: Make more shell scripts verifiable by the `shellcheck` tool (Hennadii Stepanov) Pull request description: Some shell scripts from `contrib/guix` and `contrib/shell` are not verifiable by the `shellcheck` tool for the following reasons: - they have no extension (see https://github.com/bitcoin/bitcoin/pull/21375/commits/4eccf063b252bfe256cf72d363a24cf0183e926e from bitcoin/bitcoin#21375) - they have the `.bash` extension while `.sh` is expected This PR adds these scripts to the input for the `shellcheck` tool, and it fixes discovered `shellcheck` warnings. ACKs for top commit: dongcarl: Code Review ACK a3f61676e83e908da67664c6163db61d1d11c5d2, this is a good robustness improvement for our shell scripts. jamesob: crACK https://github.com/bitcoin/bitcoin/pull/23506/commits/a3f61676e83e908da67664c6163db61d1d11c5d2 Tree-SHA512: 6703f5369d9c04c1a174491f381afa5ec2cc4d37321c1b93615abcdde4dfd3caae82868b699c25b72132d8c8c6f2e9cf24d38eb180ed4d0f0584d8c282e58935
2021-11-30Break validation <-> txmempool circular dependencyglozow
No behavior change. Parameterize removeForReorg using a CChain and callable that encapsulates validation logic. The mempool shouldn't need to know a bunch of details about coinbase maturity and lock finality. Instead, just pass in a callable function that says true/false. Breaks circular dependency by removing txmempool's dependency on validation.
2021-11-28test: Make more shell scripts verifiable by the `shellcheck` toolHennadii Stepanov
2021-11-20script: preventing non-compatible sed binary.anouar kappitou
2021-11-18Remove strtol in torcontrolMarcoFalke
2021-11-16doc: Fix typos in endif header commentsMarcoFalke
2021-11-16Merge bitcoin/bitcoin#23474: test: scripted-diff cleanups after generate* ↵fanquake
changes fac23c211407a77af82bb1491c48c8d37022c8b3 scripted-diff: Bump copyright headers (MarcoFalke) fa974f1f1417a536636347072e86bcb54a4c909c scripted-diff: Remove redundant sync_all and sync_blocks (MarcoFalke) fad13991aea6463ecf07dd907de1c1b23837d7e7 test: Properly set sync_fun in NodeNetworkLimitedTest (MarcoFalke) faeff577093c4de9eec9491486a2c3766d46dae6 test: Use 4 spaces for indentation (MarcoFalke) Pull request description: Some cleanups after commit 94db963de501e4aba6e5d8150a01ceb85753dee1 ACKs for top commit: fanquake: ACK fac23c211407a77af82bb1491c48c8d37022c8b3 Tree-SHA512: 5acfd5bb9679b41969d0fc6fc85801ccadcd6530ea692bac6352668e06fc7a9b0e1db3fd6fba435e84afe983d2eb07bd0a47c8364462bb7110004bd3d102b698
2021-11-13test: Enable SC2046 shellcheck ruleHennadii Stepanov
2021-11-13test: Enable SC2086 shellcheck ruleHennadii Stepanov
2021-11-10scripted-diff: Bump copyright headersMarcoFalke
The previous diff touched most files in ./test/, so bump the headers to avoid having to touch them again for a bump later. -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./test/ -END VERIFY SCRIPT-
2021-10-21Add minisketch dependencyGleb Naumenko
2021-10-16lint: enable mypy checking for missing importsjosibake
Achieve this by adding some ignore, and making data/ importable. Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
2021-10-13Merge bitcoin/bitcoin#23253: bitcoin-tx: Reject non-integral and out of ↵W. J. van der Laan
range int strings fa6f29de516c7af5206b91b59ada466032329250 bitcoin-tx: Reject non-integral and out of range multisig numbers (MarcoFalke) fafab8ea5e6ed6b87fac57a5cd16a8135236cdd6 bitcoin-tx: Reject non-integral and out of range sequence ids (MarcoFalke) fa53d3d8266ad0257315d07b71b4f8a711134622 test: Check that bitcoin-tx accepts whitespace around sequence id and multisig numbers (MarcoFalke) Pull request description: Seems odd to silently accept arbitrary strings that don't even represent integral values. Fix that. ACKs for top commit: practicalswift: cr ACK fa6f29de516c7af5206b91b59ada466032329250 laanwj: Code review ACK fa6f29de516c7af5206b91b59ada466032329250 Empact: Code review ACK https://github.com/bitcoin/bitcoin/pull/23253/commits/fa6f29de516c7af5206b91b59ada466032329250 promag: Code review ACK fa6f29de516c7af5206b91b59ada466032329250. Tree-SHA512: e31f7f21fe55ac069e755557bdbcae8d5d29e20ff82e441ebdfc65153e3a31a4edd46ad3e6dea5190ecbd1b8ea5a8f94daa5d59a3b7558e46e794e30db0e6c79
2021-10-12bitcoin-tx: Reject non-integral and out of range sequence idsMarcoFalke
2021-10-12rest: Return error when header count is not integralMarcoFalke
2021-10-12Merge bitcoin/bitcoin#23227: bitcoin-tx: Avoid treating integer overflow as OP_0Samuel Dobson
fa43e7c2d9dc5e2df70acd2019bdd24023c1d333 bitcoin-tx: Avoid treating overflow as OP_0 (MarcoFalke) fa053c0019bc8b2174c485f4885f894f2b5de472 style: Fix whitespace in Parse* functions (MarcoFalke) fa03dec7e98bdda8aa596ef7943cf0a8d0bcb127 refactor: Use C++11 range based for loop in ParseScript (MarcoFalke) fad55e79ca18a5894a8da6db6309c323eecbb178 doc: Fixup ToIntegral docs (MarcoFalke) Pull request description: Seems odd to treat integer overflow as `OP_0`, so fix that. ACKs for top commit: theStack: re-ACK fa43e7c2d9dc5e2df70acd2019bdd24023c1d333 shaavan: ACK fa43e7c2d9dc5e2df70acd2019bdd24023c1d333 Tree-SHA512: 1bbe2de62d853badc18d57d169c6e78ddcdff037e5a85357995dead11c8e67a4fe35087e08a181c60753f8ce91058b7fcc06f5b7901afedc78fbacea8bc3ef4f
2021-10-08doc: Fixup ToIntegral docsMarcoFalke
2021-10-07Replace stoul with ToIntegral in dbwrapperMarcoFalke