python / release-tools

Scripts for making (C)Python releases
42 stars 34 forks source link

Lint PowerShell scripts with PSScriptAnalyzer #125

Closed hugovk closed 6 months ago

hugovk commented 6 months ago

To hopefully find things like https://github.com/python/release-tools/pull/124 in PRs rather than at the end of a two-hour release build.

Without the fix, fails like:

RuleName                            Severity     ScriptName Line  Message
--------                            --------     ---------- ----  -------
MissingEndParenthesisInFunctionPara ParseError   uploadrele 32    Missing ')' i
meterList                                        ase.ps1          n function pa
                                                                  rameter list.
UnexpectedToken                     ParseError   uploadrele 34    Unexpected to
                                                 ase.ps1          ken ')' in ex
                                                                  pression or s
                                                                  tatement.
Error: Process completed with exit code 2.

https://github.com/hugovk/release-tools/actions/runs/9003489720/job/24734231897

Thanks to https://horrell.ca/running-psscriptanalyzer-in-github-actions/

zooba commented 6 months ago

LGTM!