Skip to content

chore: lint fixes part 10#262

Open
pawbana wants to merge 1 commit intopb/coder-lint-fix9from
pb/coder-lint-fix10
Open

chore: lint fixes part 10#262
pawbana wants to merge 1 commit intopb/coder-lint-fix9from
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.

Copy link
Copy Markdown
Contributor Author

pawbana commented Apr 10, 2026

@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 from 2d8a18a to 09d6738 Compare April 13, 2026 13:19
@pawbana pawbana force-pushed the pb/coder-lint-fix9 branch 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
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