Refactor and Commit
Refactor target files and commit the result after all tests pass.
Workflow
- •Read the target file(s) and understand the current structure
- •Identify refactoring opportunities based on user request
- •Make changes following existing patterns in the codebase (prefer AST-based over token-based)
- •Update all namespaces and using statements in both main and test projects
- •Build:
dotnet build src/TsqlRefine.sln -c Release - •Fix any build errors before proceeding
- •Run full test suite:
dotnet test src/TsqlRefine.sln -c Release - •Fix any test failures
- •Commit with a descriptive message summarizing what was refactored and why
Rules
- •Never commit with failing tests
- •Always update namespaces when moving/renaming files
- •Build before testing to catch compile errors early
- •If a refactoring causes widespread breakage, revert and take a smaller approach