test: Remove all-lint.py script #29228

pull maflcko wants to merge 2 commits into bitcoin:master from maflcko:2401-test-rm-wrap-wrap- changing 4 files +49 −66
  1. maflcko commented at 1:32 PM on January 11, 2024: member

    Seems confusing to have a test runner that calls another runner (all-lint.py), which calls a subset of the lint tests.

    Fix that by just calling this subset of lint tests in the test runner directly, and remove the now unused all-lint.py.

    To run all lint checks locally, refer to the documentation: https://github.com/bitcoin/bitcoin/blob/master/test/lint/README.md#running-locally

  2. DrahtBot commented at 1:32 PM on January 11, 2024: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  3. DrahtBot added the label Tests on Jan 11, 2024
  4. kevkevinpal commented at 5:02 PM on January 13, 2024: contributor

    looks like we can replace the comment to run all the lint commands

    we can swap this test/lint/all-lint.py for test/lint/lint-*.py

  5. hebasto commented at 8:36 PM on January 14, 2024: member

    Seems confusing to have a test runner that calls another runner (all-lint.py), which calls a subset of the lint tests.

    However, it is quite convenient to run ./test/lint/all-lint.py locally, no?

  6. DrahtBot added the label CI failed on Jan 15, 2024
  7. maflcko commented at 10:16 AM on January 15, 2024: member

    Seems confusing to have a test runner that calls another runner (all-lint.py), which calls a subset of the lint tests.

    However, it is quite convenient to run ./test/lint/all-lint.py locally, no?

    Why would it be convenient, when it is called "all-lint", but at the same time skips checks such as the fs check, the subtree check, and the doc check?

  8. torkelrogstad commented at 11:05 AM on January 15, 2024: contributor

    However, it is quite convenient to run ./test/lint/all-lint.py locally, no?

    Chiming in as a very inexperienced contributor that has been bashing against CI linter failures: I would say it's very nice to have an easy way to run all tests and checks locally before pushing. The correct thing to do here would be to expand the linter script to include more of the checks, IMO.

    On a slightly related note: it would also be nice to include either instructions or CLI flags that fix linter complaints, where possible. I had issues with getting the whitespace linter to pass, and couldn't find any Makefile target, script or similar to automatically format my Python code.

  9. maflcko commented at 11:28 AM on January 15, 2024: member

    The correct thing to do here would be to expand the linter script to include more of the checks, IMO.

    If you want to run all checks locally, you can refer to the documentation (https://github.com/bitcoin/bitcoin/blob/master/test/lint/README.md#running-locally). The options include running them in a docker container, or via the test_runner.

    I am happy to close this pull, but all-lint.py never was a way to run "all" lint checks (the above mentioned were always excluded) and given that there are options to run all, I don't see its value, but maybe I am missing something.

  10. maflcko commented at 11:30 AM on January 15, 2024: member

    I had issues with getting the whitespace linter to pass, and couldn't find any Makefile target, script or similar to automatically format my Python code.

    I think you can use any automated formatter of your choice. For example black (for a file that was written fully fresh), or yapf-diff (see the docs in this repo), or any other automated formatter.

  11. TheCharlatan commented at 11:52 AM on January 15, 2024: contributor

    Concept ACK

  12. doc: move-only lint docs to one place
    Can be reviewed with --color-moved=dimmed-zebra
    fadb06c361
  13. test: Remove all-lint.py script fa2b95cf3f
  14. maflcko force-pushed on Jan 16, 2024
  15. maflcko commented at 9:56 AM on January 16, 2024: member

    looks like we can replace the comment to run all the lint commands

    Thanks, added a commit to move the documentation to one place.

  16. DrahtBot removed the label CI failed on Jan 16, 2024
  17. brunoerg commented at 1:36 PM on January 16, 2024: contributor

    I use all-lint.py frequently, it's convenient even not running all lints de facto. However, since there is other way to achieve the same and it's documentated, Concept ACK on removing it.

  18. TheCharlatan approved
  19. TheCharlatan commented at 5:41 PM on January 17, 2024: contributor

    ACK fa2b95cf3f5148d27a8fd4fb3763ca1fc139bdd9

  20. DrahtBot requested review from brunoerg on Jan 17, 2024
  21. kevkevinpal commented at 3:57 AM on January 18, 2024: contributor

    ACK fa2b95c

  22. pablomartin4btc commented at 3:47 PM on January 18, 2024: member

    tACK fa2b95cf3f5148d27a8fd4fb3763ca1fc139bdd9

    <details> <summary>I also used to run the <code>all-int.py</code> but I've tried the docker <code>linter</code> locally following the instructions from the link provided in the description of the PR and I'll use that going forward.</summary>

    
    DOCKER_BUILDKIT=1 docker build -t bitcoin-linter --file "./ci/lint_imagefile" ./ && docker run --rm -v $(pwd):/bitcoin -it bitcoin-linter
    [+] Building 169.7s (12/12) FINISHED                                                                               docker:default
     => [internal] load build definition from lint_imagefile                                                                     0.1s
     => => transferring dockerfile: 708B                                                                                         0.0s
     => [internal] load .dockerignore                                                                                            0.1s
     => => transferring context: 2B                                                                                              0.0s
     => [internal] load metadata for docker.io/library/debian:bookworm                                                           2.9s
     => [1/7] FROM docker.io/library/debian:bookworm@sha256:b16cef8cbcb20935c0f052e37fc3d38dc92bfec0bcfb894c328547f81e932d67     3.3s
     => => resolve docker.io/library/debian:bookworm@sha256:b16cef8cbcb20935c0f052e37fc3d38dc92bfec0bcfb894c328547f81e932d67     0.0s
     => => sha256:b16cef8cbcb20935c0f052e37fc3d38dc92bfec0bcfb894c328547f81e932d67 1.85kB / 1.85kB                               0.0s
     => => sha256:d1fbb74d3e14bce3a324a08c0e89ba99285c28a6886c295871d86f853e1821fc 529B / 529B                                   0.0s
     => => sha256:a6916e41aa871b09260f8949fe3c34570719f1c92ffe87d515b7eb702ebaebb1 1.46kB / 1.46kB                               0.0s
     => => sha256:1b13d4e1a46e5e969702ec92b7c787c1b6891bff7c21ad378ff6dbc9e751d5d4 49.56MB / 49.56MB                             2.0s
     => => extracting sha256:1b13d4e1a46e5e969702ec92b7c787c1b6891bff7c21ad378ff6dbc9e751d5d4                                    1.0s
     => [internal] load build context                                                                                            0.1s
     => => transferring context: 6.78kB                                                                                          0.0s
     => [2/7] COPY ./.python-version /.python-version                                                                            0.1s
     => [3/7] COPY ./ci/lint/container-entrypoint.sh /entrypoint.sh                                                              0.1s
     => [4/7] COPY ./ci/lint/04_install.sh /install.sh                                                                           0.1s
     => [5/7] COPY ./test/lint/test_runner /test/lint/test_runner                                                                0.1s
     => [6/7] RUN /install.sh &&   echo 'alias lint="./ci/lint/06_script.sh"' >> ~/.bashrc &&   chmod 755 /entrypoint.sh &&    155.6s
     => [7/7] WORKDIR /bitcoin                                                                                                   0.1s
     => exporting to image                                                                                                       7.2s 
     => => exporting layers                                                                                                      7.2s 
     => => writing image sha256:ab4f85fd71350e3f776adb68c125f862111e3c19ce6e9a3cacdf05202a2c4fac                                 0.0s 
     => => naming to docker.io/library/bitcoin-linter                                                                            0.0s 
    + '[' -n 1 ']'                                                                                                                    
    ++ git merge-base HEAD master
    + COMMIT_RANGE=c2d04f1319a6af6140d17339c4814e0cfc605dd2..HEAD
    + export COMMIT_RANGE
    + RUST_BACKTRACE=1
    + /lint_test_runner/test_runner
    src/crypto/ctaes in HEAD currently refers to tree 1b6c31139a71f80245c09597c343936a8e41d021
    src/crypto/ctaes in HEAD was last updated in commit 8501bedd7508ac514385806e191aec21ee978891 (tree 1b6c31139a71f80245c09597c343936a8e41d021)
    GOOD
    src/secp256k1 in HEAD currently refers to tree 4f5d0a37a5ce94a773267b04af331b5f680b0433
    src/secp256k1 in HEAD was last updated in commit 29fde0223abc706925188014209eba75390a9df8 (tree 4f5d0a37a5ce94a773267b04af331b5f680b0433)
    GOOD
    src/minisketch in HEAD currently refers to tree a749309e1b4edf48091edb57da6de2e8a16498a5
    src/minisketch in HEAD was last updated in commit e9f1d8c27261070d209a28570ad36fe91531cdd2 (tree a749309e1b4edf48091edb57da6de2e8a16498a5)
    GOOD
    src/leveldb in HEAD currently refers to tree bd49d3c60051c1a8d8f030fa4ba7a29237fe7479
    src/leveldb in HEAD was last updated in commit 1a463c70a368fb20316e03efac273438cf47baa3 (tree bd49d3c60051c1a8d8f030fa4ba7a29237fe7479)
    GOOD
    src/crc32c in HEAD currently refers to tree 5a1b5f7188bd2181e2a71d431fff282d50058e46
    src/crc32c in HEAD was last updated in commit 08269e54a9a74e06c9fb72720a216d8c4d4532a2 (tree 5a1b5f7188bd2181e2a71d431fff282d50058e46)
    GOOD
    Args used        : 209
    Args documented  : 220
    Args undocumented: 0
    set()
    Args unknown     : 11
    {'-zmqpubhashblockhwm', '-zmqpubsequence', '-zmqpubrawtxhwm', '-zmqpubhashtx', '-zmqpubrawblock', '-zmqpubrawblockhwm', '-zmqpubrawtx', '-zmqpubsequencehwm', '-zmqpubhashtxhwm', '-includeconf', '-zmqpubhashblock'}
    src/test/fuzz/package_eval.cpp:214: non-existant ==> non-existent
    src/test/span_tests.cpp:56: memeber ==> member
    ^ Warning: codespell identified likely spelling errors. Any false positives? Add them to the list of ignored words in test/lint/spelling.ignore-words.txt
    Success: no issues found in 280 source files
    + '[' '' = bitcoin/bitcoin ']'
    

    </details>

  23. brunoerg approved
  24. brunoerg commented at 5:11 PM on January 18, 2024: contributor

    utACK fa2b95cf3f5148d27a8fd4fb3763ca1fc139bdd9

  25. achow101 commented at 5:57 PM on January 18, 2024: member

    ACK fa2b95cf3f5148d27a8fd4fb3763ca1fc139bdd9

  26. achow101 merged this on Jan 18, 2024
  27. achow101 closed this on Jan 18, 2024

  28. maflcko deleted the branch on Jan 18, 2024
  29. bitcoin locked this on Jan 17, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-24 06:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me