Skip to content

Commit 09be2c9

Browse files
fix(shims): resolve Windows batch file syntax error in generated shims (#556)
* fix(shims): resolve Windows batch file syntax error in generated shims Fixes #555 The Windows .bat shim template contained problematic syntax that broke CMD batch file parsing: - goto/label (:found_file) inside parenthesized if (...) block - Direct %* expansion inside nested for (...) do (...) block These caused 'was unexpected at this time' errors when running any Go command through the shims on Windows. Solution: - Move file argument detection to a safe subroutine (:detect_file_arg) - Call subroutine using 'call' instead of inline goto/label - Add explicit exit code propagation with exit /b %ERRORLEVEL% This matches the safer approach suggested in the issue report and ensures shims work correctly in both cmd.exe and PowerShell. * [AB#555] docs: add GitHub Copilot instructions for AI agents Provides comprehensive guidance for AI coding assistants including: - Branch structure and PR guidelines (main vs master) - Platform-specific constraints (Windows batch file gotchas) - Development patterns and testing guidelines - Common tasks and issue resolution checklist This helps AI agents understand project conventions and avoid common pitfalls like Windows batch file syntax errors. * [AB#555] docs: add AGENTS.md for AI coding assistants Root-level AI agent instructions that complement .github/copilot-instructions.md. Provides quick-start guidance, architecture overview, and critical Windows development constraints. Multiple locations ensure broader AI tool compatibility: - AGENTS.md (root) - discovered by most AI systems - .github/copilot-instructions.md - GitHub Copilot specific * [AB#555] Update gitignore * docs: add comprehensive testing standards and development guidelines Enhanced AI agent documentation with: Testing Standards: - Testing philosophy (TDD, coverage goals, performance) - Environment requirements (unset GOENV_DEBUG critical for tests) - Complete test targets reference (make test, test-quick, test-verbose, etc.) - Test organization patterns and naming conventions - Platform-specific testing (Unix/Windows validation) - Test artifacts locations (.test-results/) - PR requirements checklist - Common testing commands quick reference Directory Structure: - Complete cmd/ directory reference (12 command categories) - Complete internal/ directory reference (31 packages) - Clear separation of concerns and package purposes This comprehensive documentation eliminates the need to rebuild context for each PR and ensures consistent development practices across the project.
1 parent 48da144 commit 09be2c9

4 files changed

Lines changed: 845 additions & 13 deletions

File tree

0 commit comments

Comments
 (0)