Skip to content

chore: lint fixes part 10#262

Merged
pawbana merged 1 commit intomainfrom
pb/coder-lint-fix10
Apr 13, 2026
Merged

chore: lint fixes part 10#262
pawbana merged 1 commit intomainfrom
pb/coder-lint-fix10

Conversation

@pawbana
Copy link
Copy Markdown
Contributor

@pawbana pawbana commented Apr 10, 2026

  • nilnil (4 → 0): added nolint:nilnil to intentional nil, nil returns in test mocks (MockProvider.CreateInterceptor, mockServerProxier.CallTool) and lastUserPrompt (no user prompt found is not an error)
  • gocritic FullResponseWriter (1 → 0): added Hijack() method to statusCapturingWriter delegating to underlying http.Hijacker
  • revive defer-in-loop (1 → 0): replaced defer shutdownCancel() with explicit shutdownCancel() call after events.Shutdown
  • staticcheck SA1026 (1 → 0): replaced responses.Error (which embeds *http.Request with unmarshalable GetBody func) with a plain struct matching the same JSON shape

All lint errors are now resolved — 0 remaining.

@pawbana pawbana marked this pull request as ready for review April 10, 2026 22:12
// statusCapturingWriter wraps http.ResponseWriter to capture the status code.
// It also implements http.Flusher to support streaming responses.
// It implements http.Flusher to support streaming and http.Hijacker to
// satisfy the FullResponseWriter lint rule.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"to satisfy the FullResponseWriter lint rule"
I don't see any details about this; can you elaborate pls?

Copy link
Copy Markdown
Contributor Author

@pawbana pawbana Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

circuitbreaker/circuitbreaker.go:106:6: ruleguard: ResponseWriter "statusCapturingWriter" must implement http.Flusher and http.Hijacker (gocritic)

I believe rule is simply that anythink that linter believes is ResponeWriter must implement Flusherand Hijacker

@pawbana pawbana force-pushed the pb/coder-lint-fix10 branch from 500e5f2 to e699dc7 Compare April 13, 2026 11:30
@pawbana pawbana force-pushed the pb/coder-lint-fix9 branch from e6ef1aa to 9edf045 Compare April 13, 2026 11:30
@pawbana pawbana force-pushed the pb/coder-lint-fix10 branch from e699dc7 to 3ab6cdb Compare April 13, 2026 11:41
@pawbana pawbana force-pushed the pb/coder-lint-fix9 branch from 9edf045 to 2d8a18a Compare April 13, 2026 11:41
@pawbana pawbana force-pushed the pb/coder-lint-fix10 branch from 3ab6cdb to bf78587 Compare April 13, 2026 13:19
@pawbana pawbana force-pushed the pb/coder-lint-fix9 branch 2 times, most recently from 09d6738 to 8e41c92 Compare April 13, 2026 13:39
@pawbana pawbana force-pushed the pb/coder-lint-fix10 branch from bf78587 to 0eee3af Compare April 13, 2026 13:39
Copy link
Copy Markdown
Contributor Author

pawbana commented Apr 13, 2026

Merge activity

  • Apr 13, 3:10 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 13, 3:13 PM UTC: Graphite couldn't merge this pull request because a downstack PR chore: lint fixes part 1 (automatic fixes) #253 failed to merge.
  • Apr 13, 3:24 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 13, 3:42 PM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 13, 3:43 PM UTC: @pawbana merged this pull request with Graphite.

@pawbana pawbana force-pushed the pb/coder-lint-fix9 branch from 8e41c92 to c64f123 Compare April 13, 2026 15:22
@pawbana pawbana force-pushed the pb/coder-lint-fix10 branch from 0eee3af to 67aff95 Compare April 13, 2026 15:22
@pawbana pawbana changed the base branch from pb/coder-lint-fix9 to graphite-base/262 April 13, 2026 15:40
@pawbana pawbana changed the base branch from graphite-base/262 to main April 13, 2026 15:41
@pawbana pawbana force-pushed the pb/coder-lint-fix10 branch from 67aff95 to 1be7fef Compare April 13, 2026 15:42
@pawbana pawbana merged commit c0f321b into main Apr 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants