Skip to content

Commit 384b1be

Browse files
committed
fix: resolve lint, module hygiene, and markdown CI failures
Fix errcheck on rows.Close(), simplify bool comparison, remove unused knownFields var, fix empty badge links, and run go work sync to update module consistency.
1 parent a0c38f5 commit 384b1be

5 files changed

Lines changed: 5 additions & 19 deletions

File tree

docs/architecture.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
**AI Coding Agent for Your Terminal**
66

77
[![Go](https://img.shields.io/badge/Go-1.26+-00ADD8?logo=go)](https://go.dev/)
8-
[![Port](https://img.shields.io/badge/Port-4590-orange)]()
9-
[![Protocol](https://img.shields.io/badge/Protocol-REST-blue)]()
8+
[![Port](https://img.shields.io/badge/Port-4590-orange)](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml)
9+
[![Protocol](https://img.shields.io/badge/Protocol-REST-blue)](https://swagger.io/specification/)
1010

1111
</div>
1212

go.mod

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/jsonc/validate.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,6 @@ func (r *ValidationResult) AddErr(err error) {
5757
r.Errors = append(r.Errors, err)
5858
}
5959

60-
// knownFields is the set of top-level field names recognized in
61-
// Claude Code settings.json. Unknown fields are tolerated.
62-
var knownFields = map[string]bool{
63-
"model": true,
64-
"permissions": true,
65-
"hooks": true,
66-
"mcpServers": true,
67-
"includeCoAuthoredBy": true,
68-
"cleanupPeriodDays": true,
69-
"forceLoginMethod": true,
70-
"apiKeyHelper": true,
71-
"env": true,
72-
}
73-
7460
// ValidateClaudeSettings validates a parsed Claude Code settings
7561
// document (a map[string]interface{}). Returns a ValidationResult
7662
// describing any issues. The function never returns a non-nil error;

internal/permissions/verdict.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func RequireApproval(reason, rule string, risk Risk) PermissionVerdict {
125125
// IsZero reports whether v is the zero value. Useful for
126126
// detecting "no verdict produced" cases.
127127
func (v PermissionVerdict) IsZero() bool {
128-
return v.Allowed == false && v.Reason == "" && v.Rule == "" &&
128+
return !v.Allowed && v.Reason == "" && v.Rule == "" &&
129129
v.Risk == 0 && v.Confidence == 0 && v.Source == ""
130130
}
131131

internal/session/session_gain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ func (g *GainTracker) ListForSession(ctx context.Context, sessionID string, n in
195195
if err != nil {
196196
return nil, fmt.Errorf("session: list gains: %w", err)
197197
}
198-
defer rows.Close()
198+
defer func() { _ = rows.Close() }()
199199
var out []GainEvent
200200
for rows.Next() {
201201
var ev GainEvent

0 commit comments

Comments
 (0)