Batch Syntax Fix With Regex Line Based Fallback

Fix repeated syntax errors across many files using regex, then fall back to line-based parsing when regex fails

vamseeachanta dde87ae 680 B Updated

File contents

Batch Syntax Fix with Line-Based Fallback

When regex replacement fails on repeated syntax patterns across 10+ files, write a line-based fixer script that reads/writes line-by-line instead. Test the regex pattern on raw bytes first (b'...' notation) to catch invisible whitespace (e.g., \n\n vs \n). If regex misses edge cases, iterate with simpler patterns or switch to manual line parsing. Verify all files parse cleanly afterward with ast.parse() or equivalent before committing.

vamseeachanta/workspace-hub/tree/main/.agents/skills/workspace-hub/learned/batch-syntax-fix-with-regex-line-based-fallback commit dde87ae2a4

Frequently asked questions

npx skillmds@latest add vamseeachanta/batch-syntax-fix-with-regex-line-based-fallback