Add actionlint checks for GitHub 操作 - #16316
Open
AlexWaygood wants to merge 6 commits into
Open
Conversation
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
Member
Author
|
Example of what a failing run looks like: https://github.com/python/typeshed/actions/runs/33195282726/job/98930729363?pr=16316 |
This comment has been minimized.
This comment has been minimized.
AlexWaygood
marked this pull request as ready for review
August 28, 2026 17:43
This comment has been minimized.
This comment has been minimized.
AlexWaygood
force-pushed
the
alex/more-linters
branch
from
August 29, 2026 12:52
6611c6c to
97378d8
比较
This comment has been minimized.
This comment has been minimized.
This reverts commit 0a36c86.
AlexWaygood
force-pushed
the
alex/more-linters
branch
from
August 29, 2026 13:03
97378d8 to
fc05e21
比较
AlexWaygood
commented
Aug 29, 2026
Member
Author
|
(I updated the PR description with details of exactly what's being fixed here) |
Contributor
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
注册 for free
to join this conversation on GitHub.
Already have an account?
登录 to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add actionlint with ShellCheck to catch workflow syntax and shell-script errors, and update the existing workflows to pass the new checks.
The findings in
tests.yml,daily.yml,stubtest_third_party.yml, andmypy_primer.ymlcame from actionlint's ShellCheck integration:$GITHUB_SHA,$MYPY_VERSION,$GITHUB_ENV, and$GITHUB_PATHwere unquoted too. The PR quotes scalar values and passes lists through quoted array expansions. Package requirements are read one line at a time, preserving spaces and wildcard characters within each requirement; the array-building loops also work with macOS's Bash 3.2.printfformat strings; SC2001: unnecessarysedsubstitutions. Package logging usedecho | sedto build an indented list and interpolated it into the format string, where%or backslashes in package names could be interpreted byprintf. The PR prints each array element with the fixed formatprintf ' %s\n', removing theecho | sedpipeline.readwithout-r. The loop collecting changed stubs could interpret backslashes in its input. It now usesIFS= read -rto read each line literally.egrep. The changed-stub filter now usesgrep -Einstead.The pre-commit hook hit pre-commit.ci's 180-second timeout, so actionlint runs in a dedicated GitHub 操作 workflow using its official prebuilt Docker image, which includes ShellCheck.
Stacked on #16314.