Skip to content

Commit b31e226

Browse files
authored
Merge pull request #2188 from dgageot/board/upgrade-golangci-lint-add-new-linters-216e8e88
Enable embeddedstructfieldcheck and godoclint linters
2 parents d40175b + 0e4162a commit b31e226

55 files changed

Lines changed: 142 additions & 43 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.golangci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ linters:
1212
- depguard
1313
- dogsled
1414
- durationcheck
15+
- embeddedstructfieldcheck
1516
- errcheck
1617
- errname
1718
- errorlint
@@ -20,6 +21,7 @@ linters:
2021
- forbidigo
2122
- ginkgolinter
2223
- gocheckcompilerdirectives
24+
- godoclint
2325
- gochecknoinits
2426
- gochecksumtype
2527
- gocritic

cmd/root/eval.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const defaultJudgeModel = "anthropic/claude-opus-4-5-20251101"
2121

2222
type evalFlags struct {
2323
evaluation.Config
24+
2425
runConfig config.RuntimeConfig
2526
outputDir string
2627
}

pkg/acp/filesystem.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ func getSessionID(ctx context.Context) (string, bool) {
3232
// and edit_file to use the ACP connection for file operations
3333
type FilesystemToolset struct {
3434
*builtin.FilesystemTool
35+
3536
agent *Agent
3637
workingDir string
3738
}

pkg/app/app.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,11 +1038,11 @@ func (a *App) ExportHTML(ctx context.Context, filename string) (string, error) {
10381038
return export.SessionToFile(a.session, agentInfo.Description, filename)
10391039
}
10401040

1041-
// UpdateSessionTitle updates the current session's title and persists it.
1042-
// It works with both local and remote runtimes.
10431041
// ErrTitleGenerating is returned when attempting to set a title while generation is in progress.
10441042
var ErrTitleGenerating = errors.New("title generation in progress, please wait")
10451043

1044+
// UpdateSessionTitle updates the current session's title and persists it.
1045+
// It works with both local and remote runtimes.
10461046
func (a *App) UpdateSessionTitle(ctx context.Context, title string) error {
10471047
if a.session == nil {
10481048
return errors.New("no active session")

pkg/content/artifact.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
// See https://github.com/opencontainers/image-spec/blob/v1.1.1/manifest.md#guidelines-for-artifact-usage
2020
type artifactImage struct {
2121
v1.Image
22+
2223
artifactType string
2324
}
2425

pkg/evaluation/eval.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import (
3232
// Runner runs evaluations against an agent.
3333
type Runner struct {
3434
Config
35+
3536
agentSource config.Source
3637
judge *Judge
3738
runConfig *config.RuntimeConfig

pkg/evaluation/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
// InputSession wraps a session with its source path for evaluation loading.
1111
type InputSession struct {
1212
*session.Session
13+
1314
SourcePath string // Path to the source eval file (not serialized)
1415
}
1516

pkg/fake/proxy_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ func TestSimulatedStreamCopy_SSEEvents(t *testing.T) {
303303
// notifyWriter wraps an http.ResponseWriter and signals on first Write.
304304
type notifyWriter struct {
305305
http.ResponseWriter
306+
306307
notify chan struct{}
307308
notified bool
308309
}

pkg/hooks/types.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,32 @@ import (
1313
type EventType string
1414

1515
const (
16-
// PreToolUse is triggered before a tool call executes.
16+
// EventPreToolUse is triggered before a tool call executes.
1717
// Can allow/deny/modify tool calls; can block with feedback.
1818
EventPreToolUse EventType = "pre_tool_use"
1919

20-
// PostToolUse is triggered after a tool completes successfully.
20+
// EventPostToolUse is triggered after a tool completes successfully.
2121
// Can provide validation, feedback, or additional processing.
2222
EventPostToolUse EventType = "post_tool_use"
2323

24-
// SessionStart is triggered when a session begins or resumes.
24+
// EventSessionStart is triggered when a session begins or resumes.
2525
// Can load context, setup environment, install dependencies.
2626
EventSessionStart EventType = "session_start"
2727

28-
// SessionEnd is triggered when a session terminates.
28+
// EventSessionEnd is triggered when a session terminates.
2929
// Can perform cleanup, logging, persist session state.
3030
EventSessionEnd EventType = "session_end"
3131

32-
// OnUserInput is triggered when the agent needs input from the user.
32+
// EventOnUserInput is triggered when the agent needs input from the user.
3333
// Can log, notify, or perform actions before user interaction.
3434
EventOnUserInput EventType = "on_user_input"
3535

36-
// Stop is triggered when the model finishes its response and is about
36+
// EventStop is triggered when the model finishes its response and is about
3737
// to hand control back to the user. Can perform post-response validation,
3838
// logging, or cleanup.
3939
EventStop EventType = "stop"
4040

41-
// Notification is triggered when the agent emits a notification to the user,
41+
// EventNotification is triggered when the agent emits a notification to the user,
4242
// such as errors or warnings. Can send external notifications or log events.
4343
EventNotification EventType = "notification"
4444
)

pkg/model/provider/anthropic/adapter.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
// streamAdapter adapts the Anthropic stream to our interface
2020
type streamAdapter struct {
2121
retryableStream[anthropic.MessageStreamEventUnion]
22+
2223
trackUsage bool
2324
toolCall bool
2425
toolID string

0 commit comments

Comments
 (0)