mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 05:57:59 +01:00
test: add an easy way to run linters locally
Adds a Dockerfile configuration that allows straightforward running of linters with compatible versions locally. This removes a ton of annoyance when trying to appease CI, because many of the linter versions are quite old and difficult to maintain locally. I realize that people may not be thrilled to more ancillary tooling to the repo, but I think this makes a lot of sense given the linter versions listed in this container configuration are dictated by this repo (within the CI configuration), so having these things live in two separate places is a recipe for version mismatches. Eventually we can likely just use this container on CI directly to avoid any chance of inconsistencies between local dev experience and CI.
This commit is contained in:
@@ -1,5 +1,23 @@
|
||||
This folder contains lint scripts.
|
||||
|
||||
Running locally
|
||||
===============
|
||||
|
||||
To run linters locally with the same versions as the CI environment, use the included
|
||||
Dockerfile:
|
||||
|
||||
```sh
|
||||
cd ./ci/lint
|
||||
docker build -t bitcoin-linter .
|
||||
|
||||
cd /root/of/bitcoin/repo
|
||||
docker run --rm -v $(pwd):/bitcoin -it bitcoin-linter
|
||||
```
|
||||
|
||||
After building the container once, you can simply run the last command any time you
|
||||
want to lint.
|
||||
|
||||
|
||||
check-doc.py
|
||||
============
|
||||
Check for missing documentation of command line options.
|
||||
|
||||
Reference in New Issue
Block a user