docs: fix pkg.go.dev license detection and comprehensive doc improvements (v1.9.1)#351
Conversation
…ents (v1.9.1) PRIMARY FIX: Remove leading blank line from LICENSE file that prevented google/licensecheck from detecting Apache-2.0, causing ALL documentation to be suppressed as non-redistributable on pkg.go.dev. DOCUMENTATION IMPROVEMENTS (52 files): - Consolidate competing package doc comments: each package now has exactly one authoritative doc comment in doc.go; secondary files converted to file-level comments (blank line before package declaration) - Add missing package-level doc comments to formatter, transform, schema, advisor, cbinding packages - Add doc comments to all exported symbols in models, ast, errors, transform - Add individual doc comments to all 100+ TokenType constants with SQL examples - Add comprehensive docs to all 24 error builder functions - Add docs to all exported transform functions (AddWhere, ReplaceWhere, etc.) - Add docs to all exported AST node methods (TokenLiteral, Children, SQL) - Expand DefaultFormatOptions, Optimizer, and C-binding package docs Resolves: pkg.go.dev showing UNKNOWN license and suppressing all documentation Effect: After v1.9.1 tag push, pkg.go.dev will re-crawl and show Apache-2.0 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Claude finished @ajitpratap0's task —— View job Code Review CompleteI've conducted a comprehensive review of this pull request focusing on code quality, potential bugs, performance, security, and test coverage. Todo List
Review Summary✅ CRITICAL LICENSE FIXThe LICENSE file fix is perfect — removing the leading blank line will resolve the pkg.go.dev license detection issue. This single-line change has maximum impact and should immediately fix documentation visibility across all 20+ packages. ✅ EXCELLENT DOCUMENTATION IMPROVEMENTSStrengths:
Examples of quality improvements:
✅ CODE QUALITY ASSESSMENTPerformance Considerations:
Code Structure:
✅ SECURITY REVIEWNo Security Issues Found:
✅ POTENTIAL ISSUES ADDRESSEDMinor Improvements Suggested:
📋 TEST COVERAGE IMPLICATIONSPositive Impact:
🎯 RECOMMENDATIONS
🏆 OVERALL ASSESSMENTGrade: A+ (Exceptional) This is an exemplary pull request that:
Impact: Transforms GoSQLX from having incomplete pkg.go.dev documentation to having comprehensive, professional documentation across all packages. Recommendation: Immediate approval and merge. This PR will significantly improve the project's discoverability and usability. |
Summary
LICENSEfile that preventedgoogle/licensecheckfrom detecting Apache-2.0, causing ALL package documentation to show as non-redistributable (UNKNOWN) on pkg.go.dev// Package Xdoc comments — each package now has exactly one authoritative doc comment indoc.goformatter,transform,schema,advisor,cbindingmodels,ast,errors,transformpackagesTokenTypeconstants with concrete SQL examplesRoot Cause
The
LICENSEfile had a leading blank line (\n) before the Apache License header text.google/licensecheck(used by pkg.go.dev) requires the license text to start at byte 0 or very near it — the extra newline pushed fuzzy-match confidence below threshold → UNKNOWN license → all 20+ sub-packages showed zero documentation on pkg.go.dev.Files Changed
LICENSE: removed leading blank line (1-line fix, maximum impact)Test Plan
go fmtpasses (pre-commit hook verified)go vetpassesgo test -short ./...— all 27 packages passv1.9.1and push to trigger GoReleaser + pkg.go.dev re-crawlhttps://pkg.go.dev/github.com/ajitpratap0/GoSQLX@v1.9.1shows Apache-2.0 and full docs🤖 Generated with Claude Code