8000
Skip to content

Exclude underscore from subshell assignment warnings - #3484

Merged
koalaman merged 1 commit into
koalaman:masterfrom
VrtxOmega:fix-sc2030-underscore-3478
Jun 11, 2026
Merged

Exclude underscore from subshell assignment warnings#3484
koalaman merged 1 commit into
koalaman:masterfrom
VrtxOmega:fix-sc2030-underscore-3478

Conversation

@VrtxOmega
Copy link
Copy Markdown
Contributor

Fixes #3478.

Summary

  • exclude _ from the subshell assignment warning flow alongside the existing special-case variables
  • add regression tests for read -r a _ c in a subshell and for reading $_ afterward

Validation

  • cabal test all in haskell:9.6.6
  • cabal build exe:shellcheck in haskell:9.6.6
  • cabal exec shellcheck -- /evidence/repro-underscore.sh in haskell:9.6.6

@koalaman
koalaman merged commit 7d37c4f into koalaman:master Jun 11, 2026
16 checks passed
@koalaman
Copy link
Copy Markdown
Owner

Thanks!

@VrtxOmega
VrtxOmega deleted the fix-sc2030-underscore-3478 branch June 11, 2026 12:35
@VrtxOmega
Copy link
Copy Markdown
Contributor Author

Thanks again for merging this.

Small process note from our side: Premature Contribution Firewall (PCF) helped us choose this because it was a concrete false positive with no overlapping PR and could stay inside the existing rule/test surface. We'll keep using that gate so future fixes stay small and reviewable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SC2030/SC2031 should not be reported for $_

2 participants

0