tests: Port `lint-all.sh` to `lint-all.py` #24982

pull hiagopdutra wants to merge 1 commits into bitcoin:master from hiagopdutra:port_lint-all.sh_to_python changing 5 files +26 −33
  1. hiagopdutra commented at 7:38 PM on April 25, 2022: contributor

    This PR is converting test/lint/lint-all.sh to test/lint/lint-assertions.py. It's an item of #24783.

  2. hiagopdutra force-pushed on Apr 25, 2022
  3. DrahtBot added the label Docs on Apr 25, 2022
  4. DrahtBot added the label Tests on Apr 25, 2022
  5. laanwj cross-referenced this on Apr 25, 2022 from issue Port lint scripts to Python by laanwj
  6. Converting `lint-all.sh` to `lint-all.py`.
    Converting `lint-all.sh` to `lint-all.py`.
    29f44fed36
  7. hiagopdutra force-pushed on Apr 26, 2022
  8. jacobpfickes commented at 2:34 AM on April 27, 2022: contributor

    Ack 29f44fed36f45cb827c5e593ce52682a942bc296

    This is my first review but the changes seem straightforward enough. Pulled the PR and ensured it ran all lint files as intended. Looks good!

  9. jacobpfickes approved
  10. in test/lint/lint-all.py:16 in 29f44fed36
      11 | +from pathlib import Path
      12 | +from subprocess import run
      13 | +
      14 | +exit_code = 0
      15 | +mod_path = Path(__file__).parent
      16 | +for lint in glob(f"{mod_path}/lint-*"):
    


    MarcoFalke commented at 7:08 AM on April 27, 2022:
    for lint in glob(f"{mod_path}/lint-*.py"):
    

    wondering if we can make this py


    MarcoFalke commented at 7:09 AM on April 27, 2022:

    If yes, we can run the subtests with sys.executable instead of calling out to python3


    laanwj commented at 8:46 AM on April 27, 2022:

    It can be *.py after #24840. I'd also like a lint to prevent someone adding a non-Python linter again :smile: Though it's possibly out of scope of this PR.

  11. laanwj commented at 10:26 AM on April 28, 2022: member

    Tested ACK 29f44fed36f45cb827c5e593ce52682a942bc296 It works just like the bash script. Any improvements can be done later. While running this I noticed I had never actually run "lint-files.py" locally, which turned up a problem with that script, but that's not the fault of this change.

  12. laanwj renamed this:
    Converting `lint-all.sh` to `lint-all.py`.
    tests: Port `lint-all.sh` to `lint-all.py`
    on Apr 28, 2022
  13. laanwj merged this on Apr 28, 2022
  14. laanwj closed this on Apr 28, 2022

  15. hiagopdutra deleted the branch on Apr 28, 2022
  16. sidhujag referenced this in commit 19c5708911 on Apr 29, 2022
  17. MarcoFalke cross-referenced this on Jun 7, 2022 from issue test: Reliably don't start itself (lint-all.py runs all tests twice) by martinus
  18. MarcoFalke cross-referenced this on Jan 3, 2023 from issue test: Use same Python executable for subprocesses as for `all-lint.py` by kristapsk
  19. bitcoin locked this on Jan 3, 2023

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-05-20 06:53 UTC