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. |
…dates ## What changed **CHANGELOG.md** - Add [1.9.2] entry: vscode-extension/LICENSE blank line fix (PR #352) - Add [1.9.1] entry: root LICENSE blank line fix (PR #351) - Update Version History Summary table: add 1.9.2/1.9.1 rows, mark 1.9.0 as Previous **Go code version constants** - pkg/gosqlx/gosqlx.go: Version = "1.9.0" → "1.9.2" - cmd/gosqlx/cmd/root.go: Version = "1.9.0" → "1.9.2" (var + cobra.Command) - cmd/gosqlx/cmd/root.go: version comment updated to 1.9.2 - cmd/gosqlx/cmd/doc.go: version string in godoc updated - cmd/gosqlx/doc.go: "Current version: 1.9.0" → "1.9.2" - doc.go: "GoSQLX v1.9.0" → "v1.9.2" - pkg/cbinding/cbinding.go: version example in comment updated **Documentation** - All doc headers: **Version**: v1.9.0 → v1.9.2, **Last Updated**: 2026-02-28 → 2026-03-05 (USAGE_GUIDE, PRODUCTION_GUIDE, SQL_COMPATIBILITY, CLI_GUIDE, ERROR_CODES, LINTING_RULES, ARCHITECTURE, SECURITY, docs/README, API_REFERENCE) - docs/SQL_COMPATIBILITY.md: GoSQLX Version + Test Suite Version footer → 1.9.2 - docs/SECURITY.md: Analysis Date updated to 2026-03-05 - docs/MIGRATION.md: Add v1.9.0 → v1.9.2 section at top - docs/README.md: Feature Overview heading → v1.9.2 - docs/GETTING_STARTED.md: "What's New in v1.9.0" annotated with "(current: v1.9.2)" - README.md: Performance highlights, "What's New" banner → v1.9.2; add v1.9.1/v1.9.2 feature table - CLAUDE.md: current version → v1.9.2 - .github templates: example version updated to v1.9.2 https://claude.ai/code/session_01A9N5nrW1o1J1Z83meu5Ynz
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