chore(lint): activity pkg doc + 56-package ST1000 sweep#69
Merged
Conversation
added 3 commits
May 11, 2026 13:51
internal/app/activity/service.go was the only file in the activity package
and carried two distinct lint complaints:
- ST1000: package missing godoc comment. Added one explaining the
service's role (orchestration over the domain activity entities +
repository for user-facing activity events).
- 15× ST1023/gocritic: parameters typed as `interface{}` instead of
Go 1.18+ alias `any`. Bulk-replaced; semantically identical.
Build + staticcheck clean for the package.
Staticcheck ST1000 requires every Go package to have at least one file
that opens with a "// Package <name> ..." doc comment. The codebase had
56 packages without one (a long tail accumulated over the rapid scaffold
phase). One file per package now carries a comment that briefly states
the package's purpose, derived from the path:
- internal/app/<X>/ — application services
- internal/infra/postgres/<X>/ — repository implementations
- internal/infra/http/handler/ — HTTP handlers
- internal/infra/http/middleware — request middleware
- internal/infra/http/routes — route registration
- internal/infra/controller/ — background reconcilers
- internal/infra/notification/ — multi-channel delivery
- internal/infra/storage/ — binary blob backends
- internal/infra/adapters/<X>/ — scanner output adapters
- internal/config — config loader
- cmd/openctem-admin/cmd — admin CLI commands
- pkg/<X>/ — public packages
Five packages already had a comment but with the wrong subject (referred
to a renamed type or a different package name) — fixed those by hand:
- internal/app/template/validator.go ("validators" → "template")
- pkg/domain/assetgroup/entity.go ("asset_group" → "assetgroup")
- pkg/domain/scannertemplate/entity.go ("scanner_template" → "scannertemplate")
- pkg/domain/secretstore/entity.go ("credential" → "secretstore")
- pkg/domain/templatesource/entity.go ("template_source" → "templatesource")
Verification: `staticcheck ./...` now reports 0 issues (was: 56 ST1000 + the
godoc-subject ones above). `go build ./...` and `go test ./tests/unit/...`
pass unchanged. No behavior change — pure docstrings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #68 (which was squash-merged before these two commits landed). Clears remaining staticcheck warnings:
internal/app/activity/service.go— added// Package activity ...doc comment + bulk replaced 15×interface{}→any(ST1000, ST1019)// Package <name> ...comment to one canonical file per package (preferringservice.gowhere present) (ST1000)5 packages had pre-existing comments with mismatched names — fixed by hand:
internal/app/template/validator.go,pkg/domain/{assetgroup,scannertemplate,secretstore,templatesource}/entity.go.Verification
GOWORK=off go build ./...— exit 0GOWORK=off staticcheck ./...— 0 issues across the whole repoTest plan