Skip to content

Enable embeddedstructfieldcheck and godoclint linters#2188

Open
dgageot wants to merge 1 commit intodocker:mainfrom
dgageot:board/upgrade-golangci-lint-add-new-linters-216e8e88
Open

Enable embeddedstructfieldcheck and godoclint linters#2188
dgageot wants to merge 1 commit intodocker:mainfrom
dgageot:board/upgrade-golangci-lint-add-new-linters-216e8e88

Conversation

@dgageot
Copy link
Member

@dgageot dgageot commented Mar 19, 2026

Add two new golangci-lint linters and fix all existing violations:

  • embeddedstructfieldcheck: enforce embedded fields at the top of structs with a blank line separating them from regular fields
  • godoclint: enforce godoc comments start with the symbol name and remove duplicate package comments

The bulk of the changes are mechanical: adding a blank line after embedded fields in struct definitions, moving AgentContext to the top of event structs in pkg/runtime/event.go, and fixing godoc comments in pkg/hooks/types.go, pkg/tui/styles/styles.go, and pkg/app/app.go.

Add two new golangci-lint linters and fix all existing violations:

- embeddedstructfieldcheck: enforce embedded fields at the top of structs
  with a blank line separating them from regular fields
- godoclint: enforce godoc comments start with the symbol name and
  remove duplicate package comments

The bulk of the changes are mechanical: adding a blank line after
embedded fields in struct definitions, moving AgentContext to the top
of event structs in pkg/runtime/event.go, and fixing godoc comments
in pkg/hooks/types.go, pkg/tui/styles/styles.go, and pkg/app/app.go.

Assisted-By: docker-agent
@dgageot dgageot requested a review from a team as a code owner March 19, 2026 22:14
Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

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

Assessment: 🟢 APPROVE

This PR enables two new golangci-lint linters (embeddedstructfieldcheck and godoclint) and fixes all existing violations. The changes are purely mechanical and stylistic:

  • Adding blank lines after embedded struct fields
  • Moving AgentContext to the top of event structs
  • Fixing godoc comments to start with symbol names
  • Removing duplicate package comments

No functional bugs were found. The changes follow Go best practices and improve code consistency without affecting runtime behavior.

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.

1 participant