File tree Expand file tree Collapse file tree 3 files changed +38
-1
lines changed Expand file tree Collapse file tree 3 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ win32-build
131131test /config.ini
132132test /cache /*
133133test /.mypy_cache /
134+ test /lint /test_runner /target /
134135
135136! src /leveldb * /Makefile
136137
Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ clean-docs:
314314clean-local : clean-docs
315315 rm -rf coverage_percent.txt test_dash.coverage/ total.coverage/ fuzz.coverage/ test/tmp/ cache/ $(OSX_APP )
316316 rm -rf test/functional/__pycache__ test/functional/test_framework/__pycache__ test/cache share/rpcauth/__pycache__
317- rm -rf dist/
317+ rm -rf dist/ test/lint/test_runner/target/ test/lint/__pycache__
318318
319319test-security-check :
320320if TARGET_DARWIN
Original file line number Diff line number Diff line change @@ -17,6 +17,42 @@ docker run --rm -v $(pwd):/bitcoin -it bitcoin-linter
1717After building the container once, you can simply run the last command any time you
1818want to lint.
1919
20+ test runner
21+ ===========
22+
23+ To run all the lint checks in the test runner outside the docker you first need
24+ to install the rust toolchain using your package manager of choice or
25+ [ rustup] ( https://www.rust-lang.org/tools/install ) .
26+
27+ Then you can use:
28+
29+ ``` sh
30+ ( cd ./test/lint/test_runner/ && cargo fmt && cargo clippy && RUST_BACKTRACE=1 cargo run )
31+ ```
32+
33+ #### Dependencies
34+
35+ | Lint test | Dependency |
36+ | -----------| :----------:|
37+ | [ ` lint-python.py ` ] ( lint/lint-python.py ) | [ flake8] ( https://gitlab.com/pycqa/flake8 )
38+ | [ ` lint-python.py ` ] ( lint/lint-python.py ) | [ lief] ( https://github.com/lief-project/LIEF )
39+ | [ ` lint-python.py ` ] ( lint/lint-python.py ) | [ mypy] ( https://github.com/python/mypy )
40+ | [ ` lint-python.py ` ] ( lint/lint-python.py ) | [ pyzmq] ( https://github.com/zeromq/pyzmq )
41+ | [ ` lint-python-dead-code.py ` ] ( lint/lint-python-dead-code.py ) | [ vulture] ( https://github.com/jendrikseipp/vulture )
42+ | [ ` lint-shell.py ` ] ( lint/lint-shell.py ) | [ ShellCheck] ( https://github.com/koalaman/shellcheck )
43+ | [ ` lint-spelling.py ` ] ( lint/lint-spelling.py ) | [ codespell] ( https://github.com/codespell-project/codespell )
44+
45+ In use versions and install instructions are available in the [ CI setup] ( ../../ci/lint/04_install.sh ) .
46+
47+ Please be aware that on Linux distributions all dependencies are usually available as packages, but could be outdated.
48+
49+ #### Running the tests
50+
51+ Individual tests can be run by directly calling the test script, e.g.:
52+
53+ ```
54+ test/lint/lint-files.py
55+ ```
2056
2157check-doc.py
2258============
You can’t perform that action at this time.
0 commit comments