Skip to content

Add batch linter and harden echo usage - #3

Closed
mixmansoundude wants to merge 1 commit into
mainfrom
codex/perform-batch-file-syntax-checking
Closed

Add batch linter and harden echo usage#3
mixmansoundude wants to merge 1 commit into
mainfrom
codex/perform-batch-file-syntax-checking

Conversation

@mixmansoundude

Copy link
Copy Markdown
Owner

Summary

  • add lint_batch.py for basic CMD batch syntax checks
  • replace unsafe echo patterns in run_setup.bat with echo(

Testing

  • python lint_batch.py run_setup.bat && echo LINT_OK

https://chatgpt.com/codex/tasks/task_e_68c16dbaba14832ab47861acc5afd483

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Comment thread run_setup.bat
) 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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 👍 / 👎.

@mixmansoundude
mixmansoundude deleted the codex/perform-batch-file-syntax-checking branch September 12, 2025 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant