Polish for open-source release
Major improvements to code quality, documentation, and CI: Code Quality: - Add golangci-lint configuration with 13 linters - Fix unchecked error returns in export/import/init - Refactor duplicate scanIssues code - Add package comments for all packages - Add const block comments for exported constants - Configure errcheck to allow idiomatic defer patterns Documentation: - Add comprehensive CONTRIBUTING.md with setup, testing, and workflow - Fix QUICKSTART.md binary name references (beads → bd) - Correct default database path documentation CI/CD: - Add GitHub Actions workflow for tests and linting - Enable race detection and coverage reporting - Automated quality checks on all PRs All tests passing. Lint issues reduced from 117 to 103 (remaining are idiomatic patterns and test code). Ready for open-source release. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -56,7 +56,11 @@ Output to stdout by default, or use -o flag for file output.`,
|
||||
fmt.Fprintf(os.Stderr, "Error creating output file: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
defer f.Close()
|
||||
defer func() {
|
||||
if err := f.Close(); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Warning: failed to close output file: %v\n", err)
|
||||
}
|
||||
}()
|
||||
out = f
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,11 @@ Behavior:
|
||||
fmt.Fprintf(os.Stderr, "Error opening input file: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
defer f.Close()
|
||||
defer func() {
|
||||
if err := f.Close(); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Warning: failed to close input file: %v\n", err)
|
||||
}
|
||||
}()
|
||||
in = f
|
||||
}
|
||||
|
||||
|
||||
@@ -47,11 +47,13 @@ and database file. Optionally specify a custom issue prefix.`,
|
||||
ctx := context.Background()
|
||||
if err := store.SetConfig(ctx, "issue_prefix", prefix); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error: failed to set issue prefix: %v\n", err)
|
||||
store.Close()
|
||||
_ = store.Close()
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
store.Close()
|
||||
if err := store.Close(); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Warning: failed to close database: %v\n", err)
|
||||
}
|
||||
|
||||
green := color.New(color.FgGreen).SprintFunc()
|
||||
cyan := color.New(color.FgCyan).SprintFunc()
|
||||
|
||||
@@ -64,7 +64,7 @@ var rootCmd = &cobra.Command{
|
||||
},
|
||||
PersistentPostRun: func(cmd *cobra.Command, args []string) {
|
||||
if store != nil {
|
||||
store.Close()
|
||||
_ = store.Close()
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user