lint: use shared subtree exclusions in shell linters #36749

Closed
aaron-leeb wants to merge 1 commit from ci-subtree-lint-scope into master AGit
aaron-leeb commented 2026-11-04 04:18:49 +00:00 (Migrated from github.com)

This PR partially addresses the subtree lint scope inconsistencies discussed in #34928.

The Python shell linters, lint-shell.py and lint-shell-locale.py, now use SHARED_EXCLUDED_SUBTREES instead of maintaining hardcoded subtree exclusions.

This also removes the overly broad regex in lint-shell.py while preserving the current set of excluded shell scripts.

The explicit per-linter subtree opt-ins discussed in #34928 are not implemented in this PR. This change focuses on consolidating the existing exclusions without modifying the current lint scope.

Compared the original exclusion logic against the shared subtree list for all 61 tracked .sh files:

Linter Before excluded After excluded
lint-shell.py 10 10
lint-shell-locale.py 10 10

Both linters preserve their existing .sh file exclusion scope.

The following checks also passed:

  • ./ci/lint.py
  • ./ci/lint.py --lint=all_python_linters
  • ./ci/lint.py --lint=py_lint

Related to #34928.

This PR partially addresses the subtree lint scope inconsistencies discussed in #34928. The Python shell linters, `lint-shell.py` and `lint-shell-locale.py`, now use `SHARED_EXCLUDED_SUBTREES` instead of maintaining hardcoded subtree exclusions. This also removes the overly broad regex in `lint-shell.py` while preserving the current set of excluded shell scripts. The explicit per-linter subtree opt-ins discussed in #34928 are not implemented in this PR. This change focuses on consolidating the existing exclusions without modifying the current lint scope. Compared the original exclusion logic against the shared subtree list for all 61 tracked `.sh` files: | Linter | Before excluded | After excluded | |---|---:|---:| | `lint-shell.py` | 10 | 10 | | `lint-shell-locale.py` | 10 | 10 | Both linters preserve their existing `.sh` file exclusion scope. The following checks also passed: - `./ci/lint.py` - `./ci/lint.py --lint=all_python_linters` - `./ci/lint.py --lint=py_lint` Related to #34928.
DrahtBot commented 2026-11-04 04:18:58 +00:00 (Migrated from github.com)

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

External sites

Reviews

See the guideline and AI policy for information on the review process.
A summary of reviews will appear here.

<!--e57a25ab6845829454e8d69fc972939a--> The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. <!--006a51241073e994b41acfe9ec718e94--> ### External sites * Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/36749 * Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/36749.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/36749#author-ralph <!--021abf342d371248e50ceaed478a90ca--> ### Reviews See [the guideline](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#code-review) and [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md) for information on the review process. A summary of reviews will appear here. <!--5faf32d7da4f0f540f40219e4f7537a3-->
First-time contributor

No verified findings are available from this review.

Review coverage was incomplete.


Reviewed: c198dc8b96d1 · Full review report · Previous reports

permalink

<!-- forgejo-review-bot:bitcoin/bitcoin --> <!-- ralph-engine:current:965af1044d9e41839565702e4d9bd0a751eda81f6e8b6402747fa296ef84ebea:7efd3c3ba41667382004cfa7a7db56605da7d8f9b7ab69bc483f27117390ba48 --> <!-- ralph-base:ed3d34ba0c0b28bb281b265eaca62222aae3a796 --> <!-- ralph-head:c198dc8b96d1e1f73d1bc862eb3871ccae1b7b98 --> <!-- ralph-case:66745d13e6d59163621083b830da77cd0ecb509bb16688cb1e893cc446cfc933 --> No verified findings are available from this review. Review coverage was incomplete. <!-- Review tier: standard --> --- Reviewed: [`c198dc8b96d1`](<https://git.fish.foo/bitcoin/bitcoin/commit/c198dc8b96d1e1f73d1bc862eb3871ccae1b7b98>) · [Full review report](<https://review.fish.foo/traces/36749-c198dc8b96d1e1f73d1bc862eb3871ccae1b7b98-2100-2.html>) · [Previous reports](<https://review.fish.foo/traces/36749/>) [permalink](<https://review.fish.foo/traces/36749-c198dc8b96d1e1f73d1bc862eb3871ccae1b7b98-2100-2.html>)
aaron-leeb commented 2026-11-04 04:36:27 +00:00 (Migrated from github.com)

Given the direction of #36742, would it make more sense to limit this PR to lint-shell-locale.py and leave the lint-shell.py changes to your PR, @maflcko?

Given the direction of #36742, would it make more sense to limit this PR to lint-shell-locale.py and leave the lint-shell.py changes to your PR, @maflcko?
maflcko commented 2026-11-04 08:03:58 +00:00 (Migrated from github.com)

thx, but I think it is unclear if this is the right fix. My recommendation would be https://github.com/bitcoin/bitcoin/issues/34928#issuecomment-6625798449, but let's wait a week or two for further input before implementing this.

Closing this for now in the meantime.

thx, but I think it is unclear if this is the right fix. My recommendation would be https://github.com/bitcoin/bitcoin/issues/34928#issuecomment-6625798449, but let's wait a week or two for further input before implementing this. Closing this for now in the meantime.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitcoin/bitcoin!36749
No description provided.