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. Converting `lint-all.sh` to `lint-all.py`.
    Converting `lint-all.sh` to `lint-all.py`.
    29f44fed36
  6. hiagopdutra force-pushed on Apr 26, 2022
  7. 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!

  8. jacobpfickes approved
  9. 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:
    0for 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.
  10. 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.
  11. laanwj renamed this:
    Converting `lint-all.sh` to `lint-all.py`.
    tests: Port `lint-all.sh` to `lint-all.py`
    on Apr 28, 2022
  12. laanwj merged this on Apr 28, 2022
  13. laanwj closed this on Apr 28, 2022

  14. hiagopdutra deleted the branch on Apr 28, 2022
  15. sidhujag referenced this in commit 19c5708911 on Apr 29, 2022
  16. MarcoFalke 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: 2024-11-17 06:12 UTC

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