fix: address Claude review feedback across PRs #334-337#338
fix: address Claude review feedback across PRs #334-337#338ajitpratap0 merged 3 commits intomainfrom
Conversation
- Remove deprecated pkg/security/ package - Add unit tests for decomposed SELECT parse helpers - Use token constants and add --list-dialects CLI flag - Add Location.IsZero(), extend AST positions to Case/Subquery/In/Between/CTE - Extract attachPositionToErrors helper in schema validator - Add containsAny documentation
|
Claude finished @ajitpratap0's task —— View job Code Review Completed ✅I've thoroughly reviewed this pull request addressing Claude feedback across PRs #334-337. This is a well-executed consolidation of improvements with excellent attention to detail. Review SummaryOverall Quality: Excellent - The changes are well-structured, properly tested, and follow the repository's coding standards. ✅ What's Done Well1. Security Package Cleanup
2. Comprehensive Unit Tests (
|
|
Claude finished @ajitpratap0's task —— View job Code Review: Addressing Claude Feedback Across PRs #334-337I've thoroughly reviewed this pull request that consolidates feedback from multiple PRs. The implementation demonstrates excellent software engineering practices and attention to detail. 🔍 Overall Assessment: EXCELLENT ✅This PR successfully addresses all feedback points with high-quality implementations: ✅ Code Quality & Best PracticesComprehensive Unit Testing (
|
|
Claude finished @ajitpratap0's task —— View job Code Review: PR #338 - Addressing Claude Feedback Across PRs #334-337Review Tasks:
✅ EXCELLENT IMPLEMENTATION - READY FOR MERGEThis PR demonstrates exceptional software engineering practices and successfully consolidates Claude feedback across 4 different PRs. The changes are well-structured, comprehensive, and maintain the project's high standards. 🎯 Overall AssessmentQuality Score: A+ - This is a model example of how to address code review feedback systematically and comprehensively. ✅ Major Strengths1. Comprehensive Unit Test Coverage (
|
Addresses all code review suggestions from Claude bot reviews on PRs #334, #335, #336, and #337.
Changes
1. Remove deprecated
pkg/security/(PR #334)pkg/security/directory (deprecated in favour ofpkg/sql/security/)2. Unit tests for decomposed parse helpers (PR #335)
pkg/sql/parser/select_helpers_test.gowith 29 focused unit tests covering:parseDistinctModifier: plain, DISTINCT, DISTINCT ON (single/multiple), ALLparseTopClause: basic TOP n, TOP PERCENT, TOP WITH TIES, absent in MySQL, rejected in MySQLparseWhereClause: absent, simple equality, AND, IN expression, BETWEEN expressionparseGroupByClause: absent, single column, multiple columns, ROLLUP, with HAVINGparseOrderByClause: absent, ASC, DESC, multiple, NULLS FIRST, NULLS LASTparseLimitOffsetClause: absent, LIMIT only, LIMIT + OFFSET, OFFSET only, MySQL comma syntax, rejected in SQL Server3. Dialect system improvements (PR #336)
select.goexplaining why a token-type constant is not used (lexer has noTokenTypeTOP)--list-dialectsflag togosqlx validatethat prints all valid dialects and exitscontainsAnyhelper indialect_test.go4. AST positions enhancements (PR #337)
IsZero()method tomodels.Location== (models.Location{})checks in the parser with.IsZero()Pos models.Locationfield to:CaseExpression,WhenClause,SubqueryExpression,InExpression,BetweenExpression,CommonTableExpr,WithClauseextractExprPosarms forCaseExpression,InExpression,BetweenExpression,SubqueryExpression,BinaryExpression,UnaryExpressionattachPositionToErrorshelper inpkg/schema/validator.goto eliminate the repeated position-attachment loopgithub.com/ajitpratap0/GoSQLX/pkg/modelsimport to validator.goAll tests pass (
go test ./... -count=1).