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:
@@ -1,3 +1,4 @@
|
||||
// Package sqlite implements dependency management for the SQLite storage backend.
|
||||
package sqlite
|
||||
|
||||
import (
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Package sqlite implements the storage interface using SQLite.
|
||||
package sqlite
|
||||
|
||||
import (
|
||||
@@ -11,6 +12,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
// Import SQLite driver
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"github.com/steveyegge/beads/internal/types"
|
||||
)
|
||||
@@ -404,38 +406,7 @@ func (s *SQLiteStorage) SearchIssues(ctx context.Context, query string, filter t
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
var issues []*types.Issue
|
||||
for rows.Next() {
|
||||
var issue types.Issue
|
||||
var closedAt sql.NullTime
|
||||
var estimatedMinutes sql.NullInt64
|
||||
var assignee sql.NullString
|
||||
|
||||
err := rows.Scan(
|
||||
&issue.ID, &issue.Title, &issue.Description, &issue.Design,
|
||||
&issue.AcceptanceCriteria, &issue.Notes, &issue.Status,
|
||||
&issue.Priority, &issue.IssueType, &assignee, &estimatedMinutes,
|
||||
&issue.CreatedAt, &issue.UpdatedAt, &closedAt,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to scan issue: %w", err)
|
||||
}
|
||||
|
||||
if closedAt.Valid {
|
||||
issue.ClosedAt = &closedAt.Time
|
||||
}
|
||||
if estimatedMinutes.Valid {
|
||||
mins := int(estimatedMinutes.Int64)
|
||||
issue.EstimatedMinutes = &mins
|
||||
}
|
||||
if assignee.Valid {
|
||||
issue.Assignee = assignee.String
|
||||
}
|
||||
|
||||
issues = append(issues, &issue)
|
||||
}
|
||||
|
||||
return issues, nil
|
||||
return scanIssues(rows)
|
||||
}
|
||||
|
||||
// SetConfig sets a configuration value
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Package storage defines the interface for issue storage backends.
|
||||
package storage
|
||||
|
||||
import (
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Package types defines core data structures for the bd issue tracker.
|
||||
package types
|
||||
|
||||
import (
|
||||
@@ -49,6 +50,7 @@ func (i *Issue) Validate() error {
|
||||
// Status represents the current state of an issue
|
||||
type Status string
|
||||
|
||||
// Issue status constants
|
||||
const (
|
||||
StatusOpen Status = "open"
|
||||
StatusInProgress Status = "in_progress"
|
||||
@@ -68,6 +70,7 @@ func (s Status) IsValid() bool {
|
||||
// IssueType categorizes the kind of work
|
||||
type IssueType string
|
||||
|
||||
// Issue type constants
|
||||
const (
|
||||
TypeBug IssueType = "bug"
|
||||
TypeFeature IssueType = "feature"
|
||||
@@ -97,6 +100,7 @@ type Dependency struct {
|
||||
// DependencyType categorizes the relationship
|
||||
type DependencyType string
|
||||
|
||||
// Dependency type constants
|
||||
const (
|
||||
DepBlocks DependencyType = "blocks"
|
||||
DepRelated DependencyType = "related"
|
||||
@@ -134,6 +138,7 @@ type Event struct {
|
||||
// EventType categorizes audit trail events
|
||||
type EventType string
|
||||
|
||||
// Event type constants for audit trail
|
||||
const (
|
||||
EventCreated EventType = "created"
|
||||
EventUpdated EventType = "updated"
|
||||
|
||||
Reference in New Issue
Block a user