Lint: Support running individual lint checks #30219

pull davidgumberg wants to merge 1 commits into bitcoin:master from davidgumberg:individual_lints changing 2 files +138 −15
  1. davidgumberg commented at 4:23 pm on June 3, 2024: contributor

    This PR was split out from #29965:

    Adds support for running individual tests in the rust lint suite by passing --lint=LINT_TO_RUN to the lint runner. This PR also adds a corresponding help message.

    When running with cargo run, arguments after a double dash (--) are passed to the binary instead of the cargo command. For example, in order to run the linter check that tabs are not used as whitespace:

    0cd test/lint/test_runner && cargo run -- --lint=tabs_whitespace
    
  2. DrahtBot commented at 4:23 pm on June 3, 2024: contributor

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

    Code Coverage

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko, marcofleon, achow101
    Concept ACK kristapsk

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #29965 (Lint: support running individual rust linters and improve subtree exclusion by davidgumberg)
    • #29119 (refactor: Use std::span over Span by maflcko)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  3. DrahtBot added the label Tests on Jun 3, 2024
  4. in test/lint/README.md:41 in 38e8ff4f9e outdated
    36+
    37+To see a list of all individual lint checks available in test_runner, use `-h`
    38+or `--help`:
    39+
    40+```sh
    41+( cd ./test/lint/test_runner/ && RUST_BACKTRACE=1 cargo run -- --help
    


    maflcko commented at 10:24 am on June 4, 2024:
    0( cd ./test/lint/test_runner/ && RUST_BACKTRACE=1 cargo run -- --help )
    
  5. maflcko approved
  6. maflcko commented at 10:58 am on June 4, 2024: member
    lgtm
  7. Support running individual lint checks
    Add support for passing `--lint=LINT_TO_RUN` to the lint runner and
    add corresponding help message.
    0fcbfdb7ad
  8. davidgumberg force-pushed on Jun 4, 2024
  9. maflcko commented at 1:18 pm on June 4, 2024: member
    ACK 0fcbfdb7ad172e518a10dd6e5be4cb6bb1158784
  10. marcofleon approved
  11. marcofleon commented at 3:52 pm on June 12, 2024: contributor
    Tested ACK 0fcbfdb7ad172e518a10dd6e5be4cb6bb1158784. Ran cargo run with various of the individual tests and with bad input. Also ran it with no arguments. Everything works as expected and help message looks good.
  12. kristapsk commented at 4:29 pm on June 12, 2024: contributor
    Concept ACK
  13. achow101 commented at 9:19 pm on June 12, 2024: member
    ACK 0fcbfdb7ad172e518a10dd6e5be4cb6bb1158784
  14. achow101 merged this on Jun 12, 2024
  15. achow101 closed this on Jun 12, 2024

  16. davidgumberg deleted the branch on Jun 12, 2024

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: 2025-02-05 09:13 UTC

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