test: Refactor subtree exclusion in lint tests #24435

pull maxraustin wants to merge 4 commits into bitcoin:master from maxraustin:#17413-Subtree-Exclude-Dirs changing 11 files +40 −14
  1. maxraustin commented at 1:09 AM on February 24, 2022: none

    refs #17413.

    There are several commonly excluded directories in the lint tests. Rather than having these subtrees be copied in each of these test files, they can be pulled from a shared list so that any future changes to these exclusions can be isolated to one location rather than spread out among many files.

    This first commit is a proof of concept demonstrating how this can be applied. I saw that we currently have a list of ignored words in a text file used for the spelling lint test, so I followed that general idea and moved the list of ignored subtrees into a text file as well. This can be read and parsed into whatever format we want. The extended-lint-cppcheck.sh and lint-includes.sh tests use a regex with just these directories, but some of the examples in the linked issue have additional unique exclusions so the solution needs to be able to support that.

    I wanted to create an early WIP pull request with a proof of concept to present the idea for discussion. There are several other areas that this list of subtrees can be used, outlined in the ref'd issue.

  2. Separated commonly excluded subtrees for reuseability, PoC
    refs #17413 Rather than having the commonly excluded subtrees be copied in each of these tests, they can be pulled into a shared list so that any future changes to these exclusions does not require as many file changes. This first commit is a proof of concept demonstrating how this can be applied.
    58ebed9814
  3. DrahtBot added the label Tests on Feb 24, 2022
  4. laanwj commented at 11:33 AM on February 24, 2022: member

    Concept ACK, thanks for working on this.

  5. shaavan commented at 11:57 AM on February 24, 2022: contributor

    Concept ACK

    I see there are quite a few places where these subtrees are individually excluded. Putting them into a singular list will make the excluded files easier to manage and the code cleaner.

  6. injust90 commented at 3:14 PM on March 24, 2022: none

    Concept ACK

  7. Consolidated excluded subtrees in lint tests for reusability, working changes
    refs #17413 This commit changes the remaining lint tests to use the consolidated list of excluded subtrees. I updated the changes I made to the original tests to more closely match the regular expressions I was using in the rest of the lint scripts as well.
    a47b81708f
  8. maxraustin renamed this:
    [WIP] test: Refactor subtree exclusion in lint tests
    test: Refactor subtree exclusion in lint tests
    on Mar 24, 2022
  9. maxraustin commented at 8:43 PM on March 24, 2022: none

    The remaining lint tests have been updated, this should be ready for more review now.

    Edit: There seems to still be an issue with the whitespace test, looking into that one still.

  10. Removed trailing space at the end of the utf8 encoding lint test f65f4c6e18
  11. Removed another whitespace issue in the utf8 encoding lint script 0eacbc3c6e
  12. DrahtBot commented at 8:42 AM on April 5, 2022: contributor

    <!--cf906140f33d8803c4a75a2196329ecb-->

    🐙 This pull request conflicts with the target branch and needs rebase.

    <sub>Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".</sub>

  13. DrahtBot added the label Needs rebase on Apr 5, 2022
  14. DrahtBot commented at 9:27 AM on April 5, 2022: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #24766 (lint: convert spellchecking lint test to python by fjahr)
    • #24762 (lint: Start to use py lint scripts by MarcoFalke)

    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.

  15. laanwj commented at 1:19 PM on May 9, 2022: member

    Needs update for Python ports and removal of extended-lint-cppcheck.sh.

  16. fanquake commented at 8:28 AM on June 14, 2022: member

    @maxraustin are you still workign on this?

  17. achow101 commented at 7:07 PM on October 12, 2022: member

    Closing this as it has not had any activity in a while. If you are interested in continuing work on this, please leave a comment so that it can be reopened.

  18. achow101 closed this on Oct 12, 2022

  19. fanquake added the label Up for grabs on Oct 21, 2022
  20. bitcoin locked this on Oct 21, 2023
  21. fanquake removed the label Up for grabs on Feb 26, 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: 2026-04-14 21:13 UTC

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