Add batch linter and harden echo usage - #3
Conversation
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
| ) else ( | ||
| if exist "pyproject.toml" ( | ||
| %PSH% "$raw=Get-Content 'pyproject.toml' -Raw; $m=[regex]::Match($raw,'(?im)^\s*requires-python\s*=\s*\"?([^\"''\r\n]+)'); if($m.Success){$m.Groups[1].Value}" > "~pyreq_spec.txt" | ||
| # PowerShell extracts requires-python floor; escape quotes carefully |
There was a problem hiding this comment.
[P1] Replace shell-incompatible comment
The newly added comment in the Python version detection section starts with #, but # is not a comment prefix in Windows batch files. When pyproject.toml is present this line executes as a command, printing '#' is not recognized as an internal or external command and setting ERRORLEVEL to 9009 before the PowerShell call. That spurious failure can cause later logic that checks errorlevel to misbehave. Use REM or :: for comments instead.
Useful? React with 👍 / 👎.
Summary
lint_batch.pyfor basic CMD batch syntax checksechopatterns inrun_setup.batwithecho(Testing
python lint_batch.py run_setup.bat && echo LINT_OKhttps://chatgpt.com/codex/tasks/task_e_68c16dbaba14832ab47861acc5afd483