Skip to content

Commit 49c41bb

Browse files
Patel230claude
andcommitted
fix(lint): check filepath.Walk/Body.Close/writeFrame errors, remove dead func (errcheck/unused)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent e29e51a commit 49c41bb

3 files changed

Lines changed: 3 additions & 9 deletions

File tree

cmd/chat_print.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ func runWatchPolling(root string) error {
453453

454454
func getLastModTime(root string) time.Time {
455455
var latest time.Time
456-
filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
456+
_ = filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
457457
if err != nil {
458458
return nil
459459
}

cmd/exec.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -409,12 +409,6 @@ type GHAContext struct {
409409
Mention bool // whether an @hawk mention was found in a comment
410410
}
411411

412-
// inGitHubActions reports whether the process is running inside a GitHub
413-
// Actions runner.
414-
func inGitHubActions() bool {
415-
return os.Getenv("GITHUB_ACTIONS") == "true"
416-
}
417-
418412
// detectGitHubActions inspects the GitHub Actions environment and the event
419413
// payload at GITHUB_EVENT_PATH to decide between interactive and automation
420414
// mode. It returns a context whose Active field is false when not running under

internal/mcp/ws.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func wsDial(ctx context.Context, rawURL string, headers map[string]string) (net.
185185
_ = conn.Close()
186186
return nil, nil, err
187187
}
188-
defer resp.Body.Close()
188+
defer func() { _ = resp.Body.Close() }()
189189

190190
if resp.StatusCode != http.StatusSwitchingProtocols {
191191
_ = conn.Close()
@@ -234,7 +234,7 @@ func (s *WSServer) readLoop() {
234234
case wsOpClose:
235235
return
236236
case wsOpPing:
237-
s.writeFrame(wsOpPong, payload)
237+
_ = s.writeFrame(wsOpPong, payload)
238238
continue
239239
case wsOpPong:
240240
continue

0 commit comments

Comments
 (0)