aboutsummaryrefslogtreecommitdiff
path: root/contrib/devtools
AgeCommit message (Collapse)Author
2018-03-28contrib: Fix check-doc script regexesMarcoFalke
2018-03-26Change all python files to use Python3John Newbery
2018-03-11Merge #12572: [script] lint-whitespace: find errors more easilyMarcoFalke
0fbed98e42 [script] lint-whitespace: improve print linenumber (Akio Nakamura) Pull request description: Before this PR, the linenumber infomaition is output if trailing-space or tab code was found, but the output occurence is only per a file. This PR separates the output timing of file name and line number. As a result, users will find where they need to fix more easily. example: 0) git diff ``` diff --git a/dummy.txt b/dummy.txt index c0ce4d776..aebbdb88d 100644 --- a/dummy.txt +++ b/dummy.txt @@ -1,2 +1,2 @@ -1 -2 +1 + 2 @@ -8,2 +8,2 @@ -8 -9 + 8 +9 ``` 1) before this PR - Is there "9 " in second line? It may lead to be misunderstood. ``` This diff appears to have added new lines with trailing whitespace. The following changes were suspected: diff --git a/dummy.txt b/dummy.txt @@ -1,2 +1,2 @@ +1 +9 ``` 2) after this PR ``` This diff appears to have added new lines with trailing whitespace. The following changes were suspected: diff --git a/dummy.txt b/dummy.txt @@ -1,2 +1,2 @@ +1 @@ -8,2 +8,2 @@ +9 ``` Tree-SHA512: 2fd52e3c982786f86cfe10aa2578589bc9c502bcad9b85111467840d726143330c23968cde5483ee0f563893c8381044b80e8c22a7c8eca56fc73c548b9a9496
2018-03-06Merge #12098: [scripts] lint-whitespace: add param to check last N commitsWladimir J. van der Laan
8dbf740f8 [scripts] lint-whitespace: check last N commits or unstaged changes (Sjors Provoost) Pull request description: E.g. before you push three commits to Github and upset Travis, check if you didn't make any whitespace mistakes: ```sh contrib/devtools/lint-whitespace.sh 3 ``` This is slightly more convenient than doing: ```sh TRAVIS_COMMIT_RANGE=HEAD~3...HEAD contrib/devtools/lint-whitespace.sh ``` Tree-SHA512: 5d9c1ae978ccbe59477e8cf53391e9bd697d2da87f417a2519264af560d4768138e0b2d320dd497a1f1e704e18ab279d724f523b57c17a80ccd753133a5445bf
2018-03-06Merge #12097: [scripts] lint-whitespace: use perl instead of grep -PWladimir J. van der Laan
40b17f5f9 [scripts] lint-whitespace: use perl instead of grep -P (Sjors Provoost) Pull request description: MacOS does not support `grep -P` out of the box. This change makes it easier for developers to check for whitespace problems locally. Based on [this](https://stackoverflow.com/a/16658690) and [this](https://serverfault.com/a/504387) Stack Exchange answer. Tested with: ```sh export TRAVIS_COMMIT_RANGE='fe78c9a...62e0453' contrib/devtools/lint-whitespace.sh This diff appears to have added new lines with tab characters instead of spaces. The following changes were suspected: diff --git a/src/test/bignum_tests.cpp b/src/test/bignum_tests.cpp @@ -0,0 +1,110 @@ + num.setint64(n); ``` Tree-SHA512: 37c342a0ca2580289cf326a278a051a7c21ba918d6b2143fd9987f159fab85f1de3d770fcf532a642cd5d1957afc8595678128196e102dc473924758f133db7f
2018-03-01[script] lint-whitespace: improve print linenumberAkio Nakamura
Before this PR, the linenumber infomaition is output if trailing-space or tab code was found, but the output occurence is only per a file. This PR separates the output timing of file name and line number. As a result, users will find where they need to fix more easily.
2018-02-18Merge #12308: contrib: Add support for out-of-tree builds in gen-manpages.shMarcoFalke
526e28220a contrib: Add support for out-of-tree builds in gen-manpages.sh (Wladimir J. van der Laan) Pull request description: This adds support for setting the environment variable `BUILDDIR` to point to executables that are outside the source directory. E.g. to invoke the tool when the build is in $PWD/build: ```bash BUILDDIR=$PWD/build contrib/devtools/gen-manpages.sh ``` This avoids having to manually copy the generated manpages after they end up in the build instead of source path, when setting TOPDIR instead. Tree-SHA512: 8dc6dd7a47a0c014ae7d27f0ac9d86f69238ec6bac8a3007b975bb88c9f37014755c716c5e62604dd91baad2f8a41fd1544cdca3ba4b59bc76602e6593f4a4a7
2018-02-15devtools: Exclude patches from lint-whitespaceMarcoFalke
2018-01-31contrib: Add support for out-of-tree builds in gen-manpages.shWladimir J. van der Laan
This adds support for setting the environment variable `BUILDDIR` to point to executables that are outside the source directory. E.g. to invoke the tool when the build is in $PWD/build: ```bash BUILDDIR=$PWD/build contrib/devtools/gen-manpages.sh ```
2018-01-29Enable flake8 warnings for all currently non-violated rulespracticalswift
2018-01-29Enable flake8 warning for "list comprehension redefines 'foo' from line N" ↵practicalswift
(F812)
2018-01-08[scripts] lint-whitespace: check last N commits or unstaged changesSjors Provoost
Get usage instructions: .lint-whitespace.sh -?
2018-01-05[scripts] lint-whitespace: use perl instead of grep -PSjors Provoost
MacOS does not support 'grep -P' out of the box. This change makes it easier for developers to check for whitespace problems locally.
2018-01-03Merge #12075: [scripts] Add missing univalue file to copyright_header.pyMarcoFalke
415f86c6ae [scripts] Add missing univalue file to copyright_header.py (fanquake) Pull request description: This needs to be added so that PRs like #12062 don't modify the subtree. Tree-SHA512: 3642bdb0c8271ae700857a79fa5800b0c26c4b3f126d4406f224293817fb74d498fa1fc581d576ae747fbbb6952d4369fc4ab823ab48fd0946c1e8ccbe93cee6
2018-01-03Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa
2018-01-02[scripts] Add missing univalue file to copyright_header.pyfanquake
2017-12-10Add Travis check for unused Python importspracticalswift
2017-12-04Merge #10773: Shell script cleanupsPieter Wuille
13a81b19d Add quotes to variable assignment (as requested by @TheBlueMatt) (practicalswift) 683b9d280 Fix valid path output (practicalswift) 193c2fb4c Use bash instead of POSIX sh. POSIX sh does not support arrays. (practicalswift) 80f5f28d3 Fix incorrect quoting of quotes (the previous quotes had no effect beyond unquoting) (practicalswift) 564a172df Add required space to [[ -n "$1" ]] (previously [[ -n"$1" ]]) (practicalswift) 1e44ae0e1 Add error handling: exit if cd fails (practicalswift) b9e79ab41 Remove "\n" from echo argument. echo does not support escape sequences. (practicalswift) f6b3382fa Remove unused variables (practicalswift) Pull request description: Shell script cleanups: * Add required space to `[ -n ]`. * Avoid quote within quote. * Exit if `cd` fails. * Remove `\n` which is not handled by `echo`. * ~~Remove redundant `$` in arithmetic variable expression.~~ * ~~Use `$(command)` instead of legacy form `` `command` ``.~~ * Arrays are not supported in POSIX `sh`. Use `bash` when arrays are used. * ~~`[ foo -a bar ]` is not well defined, use `[ foo ] && [ bar ]` instead.~~ * ~~`[ foo -o bar ]` is not well defined, use `[ foo ] || [ bar ]` instead.~~ Tree-SHA512: 80f6ded58bce625b15b4da30d69d2714c633e184e62b21ed67d2c58e2ebaa08b4147593324012694d02bf4f1f252844cdff2fd1cf5e817ddb07e2777db7a6390
2017-11-09Merge #11394: Perform a weaker subtree check in TravisMarcoFalke
487aff421 Check subtree consistency in Travis (Pieter Wuille) e1d0cc23a Improve git-subtree-check.sh (Pieter Wuille) Pull request description: Apparently many of our subtrees get modified by PRs in this repository, without getting noticed. To improve upon this: * Make git-subtree-check.sh capable of doing a weaker consistency check (that doesn't need access to external repositories), but which should be sufficient to detect unintended changes. It can be fooled by a fake subtree merge commit, but that would hopefully be obvious to reviewers. * Make Travis invoke this subtree check for each of our subtrees. Note that Travis is currently expected to fail on this PR, as 2 out of 4 subtrees (`src/secp156k1` and `src/univalue` have been modified directly in master). Tree-SHA512: 465b680392d3daf38a8c1dda77d6f74b1d1c23324c378774777fb95aa673e119a8f7e3ccc124e41d97b5ac8975f3d79f3015797d2d309666582394364917ec4e
2017-11-09Revert "Remove unused variable in shell script"MarcoFalke
This partially reverts commit ab8e8b97a359e1c4f1bca8e1769021c95019f2c4
2017-11-09Merge #10771: Remove unused variables in shell scriptsWladimir J. van der Laan
ab8e8b9 Remove unused variables in shell scripts. (practicalswift) Pull request description: Remove unused variables in shell scripts. Use `_` where we don't care about the result. Tree-SHA512: 35049e79ee432c805f061456c32902a92811b5214d50ce6770b22d1442cc5999ed53cfe05bb2347f6995ca33c707a0f3fe92d5829c0385c4a3e254953924cbc4
2017-10-18Use bash instead of POSIX sh. POSIX sh does not support arrays.practicalswift
2017-10-11Improve git-subtree-check.shPieter Wuille
We have several pieces of information about subtrees: 1) What their current directory contents is 2) What their directory contents was at the time of the last subtree merge 3) What the directory contents of the upstream project is in the commit referred to by the subtree merge. Normally, all 3 should be identical. git-subtree-check.sh so far only compared (1) with (3) however. Fix this by comparing all three, and give some more useful diff output in the case of mismatch. The added benefit is that (1) and (2) can be compared without needing to see the upstream repository.
2017-10-01qa: check-rpc-mapping must not run on empty listsMarcoFalke
2017-09-14contrib: Ignore historical release notes for whitespace checkWladimir J. van der Laan
Lint checks should not test these, they are historical documents, and we don't want to encourage silly changes to them to satisfy a checker. Hopefully makes travis pass again on master. Tree-SHA512: 37e6716c4fd5e8a4e579f9b84042e6b0ac224836b6c851cd1ca3f7d46611ffd3003bed0ae08dd0457f69d6eaa485a0d21c631e7ef16b14bdb0f2f78ea700332d
2017-09-14Add tab char lint check and exclude imported dependenciesMeshCollider
2017-09-14Add a lint check for trailing whitespace.Evan Klitzke
This adds a new CHECK_DOC check that looks for newly introduced trailing whitespace. Existing trailing whitespace (of which there is plenty!) will not trigger an error. This is written in a generic way so that new lint-*.sh scripts can be added to contrib/devtools/, as I'd like to contribute additional lint checks in the future.
2017-09-13Merge #10753: test: Check RPC argument mappingMarcoFalke
77aa9e59e test: Check RPC argument mapping (Wladimir J. van der Laan) Pull request description: Parse the dispatch tables from the server implementation files, and the conversion table from the client (see #10751). Perform the following consistency checks: - Arguments defined in conversion table, must be present in dispatch table. If not, it was probably forgotten to add them to the dispatch table, and they will not work. - Arguments defined in conversion table must have the same names as in the dispatch table. If not, they will not work. - All aliases for an argument must either be present in the conversion table, or not. Anything in between means an oversight and some aliases won't work. Any of these results in an error. It also performs a consistency check to see if the same named argument is sometimes converted, and sometimes not. E.g. one RPC call might have a 'verbose' argument that is converted, another RPC call might have one that is not converted. This is not necessarily wrong, but points at a possible error (as well as makes the API harder to memorize) - so it is emitted as a warning (could upgrade this to error). This test is added to travis and run when `CHECK_DOC`. Currently fails with the following output: ``` * Checking consistency between dispatch tables and vRPCConvertParams ERROR: createrawtransaction argument 3 (named optintorbf in vRPCConvertParams) is not defined in dispatch table ERROR: getblock argument ['verbosity', 'verbose'] has conflicts in vRPCConvertParams conversion specifier [True, False] WARNING: conversion mismatch for argument named verbose ([('getblock', False), ('getblockheader', True), ('getmempoolancestors', True), ('getmempooldescendants', True), ('getrawmempool', True), ('getrawtransaction', True)]) ``` - ~#10698 fixes the first ERROR~ - #10747 fixes the second ERROR, as well as the WARNING Update: #10698 was merged, leaving: ``` * Checking consistency between dispatch tables and vRPCConvertParams ERROR: getblock argument ['verbosity', 'verbose'] has conflicts in vRPCConvertParams conversion specifier [True, False] WARNING: conversion mismatch for argument named verbose ([('getblock', False), ('getblockheader', True), ('getmempoolancestors', True), ('getmempooldescendants', True), ('getrawmempool', True), ('getrawtransaction', True)]) ``` Tree-SHA512: feabebfbeda5d4613b2b9d5265aa6bde4e1a0235297ffd48fa415ad7edc531d9ed7913fe76d191ac60d481a915a326f216bc93de3c671e45e1d14e97d07dea7a
2017-09-08Add -usehd to excluded args in check-doc.pyMeshCollider
2017-09-07test: Check RPC argument mappingWladimir J. van der Laan
Parse the dispatch tables from the server implementation files, and the conversion table from the client. Perform the following consistency checks: - Arguments defined in conversion table, must be present in dispatch table. If not, it was probably forgotten to add them to the dispatch table, and they will not work. - Arguments defined in conversion table must have the same names as in the dispatch table. If not, they will not work. - All aliases for an argument must either be present in the conversion table, or not. Anything in between means an oversight and some aliases won't work. Any of these results in an error. It also performs a consistency check to see if the same named argument is sometimes converted, and sometimes not. E.g. one RPC call might have a 'verbose' argument that is converted, another RPC call might have one that is not converted. This is not necessarily wrong, but points at a possible error (as well as makes the API harder to memorize) - so it is emitted as a warning (could upgrade this to error).
2017-09-05github-merge: Coalesce git fetchesWladimir J. van der Laan
Fetch the destination branch as well as PR in one go. Saves a few seconds (as well as one ssh authentication, when using a yubikey) when using github-merge.py.
2017-08-28Use print(...) instead of undefined printf(...)practicalswift
2017-08-28Use sys.exit(...) instead of exit(...): exit(...) should not be used in programspracticalswift
2017-08-09Remove unused variables in shell scripts.practicalswift
2017-08-03Add undocumented -forcecompactdb to force LevelDB compactionsPieter Wuille
2017-07-10Add PR description to merge commit in github-merge.pyPieter Wuille
2017-06-26Random db flush crash simulatorPieter Wuille
2017-06-18doc: Remove outdated minrelaytxfee commentMarcoFalke
2017-06-13Merge #10480: Improve commit-check-script.shWladimir J. van der Laan
5432fc3 Fail on commit with VERIFY SCRIPT but no scripted-diff (Pieter Wuille) Tree-SHA512: 687b6c825f6f882f9c8e9d301bc893383710bad70216fa40b95f7e24d83a7148f9c759c3e4bd905a6cd26960829f8f6bd03106dc6c83ac312bf34ad239917018
2017-05-31devtools: Retry after signing fails in github-mergeWladimir J. van der Laan
When signing fails, go back to the sign/exit prompt instead of exiting the script.
2017-05-30Fail on commit with VERIFY SCRIPT but no scripted-diffPieter Wuille
2017-05-11Merge #10317: Remove unused Python importsWladimir J. van der Laan
0c60c63 Remove unused Python imports (practicalswift) Tree-SHA512: c7ae6a8ae2c751b771804960498bf270ab022c80fa9e1b39118d5986d890c8cdfc27a3cc24bf28c080d8088ddc11facd1f2881ba2c209cdd819675fda4689d83
2017-05-04devtools: add script to verify scriptable changesCory Fields
2017-05-02Remove unused Python importspracticalswift
2017-04-21contrib: github-merge improvementsWladimir J. van der Laan
Some minor github-merge improvements I've made over time: User interface: - Print merge details again before signing off, to refresh your memory - usually I'll have done lots of different things in the shell so this will have scrolled out a long time ago. - Require a valid answer on the prompts. One of the requested answers must be typed, if not, the prompt will re-ask. This prevents accidentally rejecting. Efficiency: - Condense "accept merge" and "sign off" prompts. There's no reason to have this as two separate prompts, both are just opportunities to skip out on the merge, no action is performed in between. Merging: - Strip spaces from github title. This avoids redundant spaces surrounding it from getting into the commit message.
2017-03-20Rename rpc-tests directory to functionalJohn Newbery
2017-03-20Rename qa directory to testJohn Newbery
2017-03-13devtools: Make github-merge compute SHA512 from git, instead of worktreeWladimir J. van der Laan
This changes tree_sha512sum() to requests the objects for hashing from git instead of from the working tree. The change should make the process more deterministic (it hashes what will be pushed) and hopefully avoids the frequent miscomputed SHA512's that happen now.
2017-03-07Merge #9602: Remove coin age priority and free transactions - implementationWladimir J. van der Laan
b421e6d Update example bitcoin.conf (Alex Morcos) 7d4e950 Allow setting minrelaytxfee to 0 (Alex Morcos) 359e8a0 [cleanup] Remove coin age priority completely. (Alex Morcos) f9b9371 [rpc] Remove priorityDelta from prioritisetransaction (Alex Morcos) 49be7e1 [rpc] Remove priority information from mempool RPC calls (Alex Morcos) 0315888 [test] Remove priority from tests (Alex Morcos) f838005 No longer allow "free" transactions (Alex Morcos) ad727f4 [rpc] sendrawtransaction no longer bypasses minRelayTxFee (Alex Morcos) fe282ac [cleanup] Remove estimatePriority and estimateSmartPriority (Alex Morcos) 400b151 [debug] Change -printpriority option (Alex Morcos) 272b25a [mining] Remove -blockprioritysize. (Alex Morcos) 12839cd [rpc] Remove estimatepriority and estimatesmartpriority. (Alex Morcos) ddf58c7 wallet: Remove sendfree (MarcoFalke) Tree-SHA512: a9a4499405923ce794ef18f9e334dbbd59dfc73a3dc2df6f85cc9c62af6f353ec2eed9c2d5e58e904f918d0d7ab738f403dd4939d9bc2276136864fe63710782
2017-03-07devtools: Fix a syntax error typoWladimir J. van der Laan
Fix a typo introduced in #9880 causing the script to not even parse.