Re:Beginning #2868
reviewdog [golangci] report
reported by reviewdog 🐶
Findings (29)
backend/scoreserver/domain/team.go|12 col 2| the methods of "Team" use pointer receiver and non-pointer receiver. (recvcheck)
backend/cmd/scoreserver/main.go|30| Function 'start' is too long (62 > 60) (funlen)
backend/cmd/scoreserver/otel.go|120 col 13| string otlp
has 4 occurrences, make it a constant (goconst)
backend/pkg/pgtest/pgtest.go|86| pkg/pgtest/pgtest.go:86: Line contains TODO/BUG/FIXME: "TODO: startContainer を使って DB を起動し,tb.Cle..." (godox)
backend/scoreserver/admin/team_test.go|33 col 92| Comittee
is a misspelling of Committee
(misspell)
backend/scoreserver/admin/team_test.go|36 col 92| Comittee
is a misspelling of Committee
(misspell)
backend/scoreserver/admin/team_test.go|42 col 76| Comittee
is a misspelling of Committee
(misspell)
backend/cmd/scoreserver/main.go|18 col 2| var flagContestantHTTPAddr
is unused (unused)
backend/cmd/scoreserver/main.go|20 col 2| var flagTelemetryAddr
is unused (unused)
backend/scoreserver/admin/team_test.go|79 col 34| Function setupTeamService->SetupDB
should pass the context parameter (contextcheck)
backend/scoreserver/admin/team_test.go|81 col 16| Function teamFixtures
should pass the context parameter (contextcheck)
backend/scoreserver/admin/team_test.go|125 col 34| Function setupTeamService->SetupDB
should pass the context parameter (contextcheck)
backend/scoreserver/admin/team_test.go|127 col 16| Function teamFixtures
should pass the context parameter (contextcheck)
backend/scoreserver/admin/team_test.go|171 col 34| Function setupTeamService->SetupDB
should pass the context parameter (contextcheck)
backend/scoreserver/admin/team_test.go|172 col 16| Function teamFixtures
should pass the context parameter (contextcheck)
backend/scoreserver/admin/team_test.go|31 col 9| admin_test. is missing field wantCode (exhaustruct)
backend/scoreserver/admin/team_test.go|40 col 19| admin_test. is missing field wants (exhaustruct)
backend/scoreserver/admin/team_test.go|46 col 21| admin_test. is missing field wants (exhaustruct)
backend/scoreserver/admin/team_test.go|53 col 17| admin_test. is missing field wants (exhaustruct)
backend/scoreserver/admin/team_test.go|91 col 30| adminv1.CreateTeamResponse is missing field Team (exhaustruct)
backend/scoreserver/admin/team_test.go|108 col 9| admin_test. is missing field wantCode (exhaustruct)
backend/scoreserver/admin/team_test.go|137 col 30| adminv1.ListTeamsResponse is missing field Teams (exhaustruct)
backend/scoreserver/admin/team_test.go|154 col 14| admin_test. is missing field wantCode (exhaustruct)
backend/scoreserver/admin/team_test.go|182 col 30| adminv1.GetTeamResponse is missing field Team (exhaustruct)
backend/scoreserver/admin/team_test.go|200 col 9| adminv1.UpdateTeamRequest is missing field UpdateMask (exhaustruct)
backend/scoreserver/admin/team_test.go|208 col 9| adminv1.UpdateTeamRequest is missing field UpdateMask (exhaustruct)
backend/scoreserver/admin/team_test.go|209 col 12| adminv1.Team is missing field Organization (exhaustruct)
backend/scoreserver/admin/team_test.go|214 col 15| adminv1.UpdateTeamRequest is missing field UpdateMask (exhaustruct)
backend/scoreserver/admin/team_test.go|235 col 30| adminv1.UpdateTeamResponse is missing field Team (exhaustruct)
Filtered Findings (0)
Annotations
Check failure on line 12 in backend/scoreserver/domain/team.go
github-actions / golangci
[golangci] backend/scoreserver/domain/team.go#L12
the methods of "Team" use pointer receiver and non-pointer receiver. (recvcheck)
Raw output
scoreserver/domain/team.go:12:2: the methods of "Team" use pointer receiver and non-pointer receiver. (recvcheck)
Team struct {
^
Check failure on line 30 in backend/cmd/scoreserver/main.go
github-actions / golangci
[golangci] backend/cmd/scoreserver/main.go#L30
Function 'start' is too long (62 > 60) (funlen)
Raw output
cmd/scoreserver/main.go:30: Function 'start' is too long (62 > 60) (funlen)
func start() int {
Check failure on line 120 in backend/cmd/scoreserver/otel.go
github-actions / golangci
[golangci] backend/cmd/scoreserver/otel.go#L120
string `otlp` has 4 occurrences, make it a constant (goconst)
Raw output
cmd/scoreserver/otel.go:120:13: string `otlp` has 4 occurrences, make it a constant (goconst)
expType := "otlp"
^
Check failure on line 86 in backend/pkg/pgtest/pgtest.go
github-actions / golangci
[golangci] backend/pkg/pgtest/pgtest.go#L86
pkg/pgtest/pgtest.go:86: Line contains TODO/BUG/FIXME: "TODO: startContainer を使って DB を起動し,tb.Cle..." (godox)
Raw output
pkg/pgtest/pgtest.go:86: pkg/pgtest/pgtest.go:86: Line contains TODO/BUG/FIXME: "TODO: startContainer を使って DB を起動し,tb.Cle..." (godox)
// TODO: startContainer を使って DB を起動し,tb.Cleanup で停止する
Check failure on line 33 in backend/scoreserver/admin/team_test.go
github-actions / golangci
[golangci] backend/scoreserver/admin/team_test.go#L33
`Comittee` is a misspelling of `Committee` (misspell)
Raw output
scoreserver/admin/team_test.go:33:92: `Comittee` is a misspelling of `Committee` (misspell)
Team: &adminv1.Team{Code: 3, Name: "トラブルバスターズ", Organization: "ICTSC Comittee"},
^
Check failure on line 36 in backend/scoreserver/admin/team_test.go
github-actions / golangci
[golangci] backend/scoreserver/admin/team_test.go#L36
`Comittee` is a misspelling of `Committee` (misspell)
Raw output
scoreserver/admin/team_test.go:36:92: `Comittee` is a misspelling of `Committee` (misspell)
Team: &adminv1.Team{Code: 3, Name: "トラブルバスターズ", Organization: "ICTSC Comittee"},
^
Check failure on line 42 in backend/scoreserver/admin/team_test.go
github-actions / golangci
[golangci] backend/scoreserver/admin/team_test.go#L42
`Comittee` is a misspelling of `Committee` (misspell)
Raw output
scoreserver/admin/team_test.go:42:76: `Comittee` is a misspelling of `Committee` (misspell)
Team: &adminv1.Team{Code: -1, Name: "below zero", Organization: "ICTSC Comittee"},
^
Check failure on line 18 in backend/cmd/scoreserver/main.go
github-actions / golangci
[golangci] backend/cmd/scoreserver/main.go#L18
var `flagContestantHTTPAddr` is unused (unused)
Raw output
cmd/scoreserver/main.go:18:2: var `flagContestantHTTPAddr` is unused (unused)
flagContestantHTTPAddr = flag.String("contestant-http-addr", "0.0.0.0:8080", "Contestant API HTTP Address")
^
Check failure on line 20 in backend/cmd/scoreserver/main.go
github-actions / golangci
[golangci] backend/cmd/scoreserver/main.go#L20
var `flagTelemetryAddr` is unused (unused)
Raw output
cmd/scoreserver/main.go:20:2: var `flagTelemetryAddr` is unused (unused)
flagTelemetryAddr = flag.String("telemetry-addr", "0.0.0.0:9090", "Telemetry HTTP Address")
^
Check failure on line 79 in backend/scoreserver/admin/team_test.go
github-actions / golangci
[golangci] backend/scoreserver/admin/team_test.go#L79
Function `setupTeamService->SetupDB` should pass the context parameter (contextcheck)
Raw output
scoreserver/admin/team_test.go:79:34: Function `setupTeamService->SetupDB` should pass the context parameter (contextcheck)
client, db := setupTeamService(t)
^
Check failure on line 81 in backend/scoreserver/admin/team_test.go
github-actions / golangci
[golangci] backend/scoreserver/admin/team_test.go#L81
Function `teamFixtures` should pass the context parameter (contextcheck)
Raw output
scoreserver/admin/team_test.go:81:16: Function `teamFixtures` should pass the context parameter (contextcheck)
teamFixtures(db)
^
Check failure on line 125 in backend/scoreserver/admin/team_test.go
github-actions / golangci
[golangci] backend/scoreserver/admin/team_test.go#L125
Function `setupTeamService->SetupDB` should pass the context parameter (contextcheck)
Raw output
scoreserver/admin/team_test.go:125:34: Function `setupTeamService->SetupDB` should pass the context parameter (contextcheck)
client, db := setupTeamService(t)
^
Check failure on line 127 in backend/scoreserver/admin/team_test.go
github-actions / golangci
[golangci] backend/scoreserver/admin/team_test.go#L127
Function `teamFixtures` should pass the context parameter (contextcheck)
Raw output
scoreserver/admin/team_test.go:127:16: Function `teamFixtures` should pass the context parameter (contextcheck)
teamFixtures(db)
^
Check failure on line 171 in backend/scoreserver/admin/team_test.go
github-actions / golangci
[golangci] backend/scoreserver/admin/team_test.go#L171
Function `setupTeamService->SetupDB` should pass the context parameter (contextcheck)
Raw output
scoreserver/admin/team_test.go:171:34: Function `setupTeamService->SetupDB` should pass the context parameter (contextcheck)
client, db := setupTeamService(t)
^
Check failure on line 172 in backend/scoreserver/admin/team_test.go
github-actions / golangci
[golangci] backend/scoreserver/admin/team_test.go#L172
Function `teamFixtures` should pass the context parameter (contextcheck)
Raw output
scoreserver/admin/team_test.go:172:16: Function `teamFixtures` should pass the context parameter (contextcheck)
teamFixtures(db)
^
Check failure on line 31 in backend/scoreserver/admin/team_test.go
github-actions / golangci
[golangci] backend/scoreserver/admin/team_test.go#L31
admin_test.<anonymous> is missing field wantCode (exhaustruct)
Raw output
scoreserver/admin/team_test.go:31:9: admin_test.<anonymous> is missing field wantCode (exhaustruct)
"ok": {
^
Check failure on line 40 in backend/scoreserver/admin/team_test.go
github-actions / golangci
[golangci] backend/scoreserver/admin/team_test.go#L40
admin_test.<anonymous> is missing field wants (exhaustruct)
Raw output
scoreserver/admin/team_test.go:40:19: admin_test.<anonymous> is missing field wants (exhaustruct)
"invalid code": {
^
Check failure on line 46 in backend/scoreserver/admin/team_test.go
github-actions / golangci
[golangci] backend/scoreserver/admin/team_test.go#L46
admin_test.<anonymous> is missing field wants (exhaustruct)
Raw output
scoreserver/admin/team_test.go:46:21: admin_test.<anonymous> is missing field wants (exhaustruct)
"duplicate code": {
^
Check failure on line 53 in backend/scoreserver/admin/team_test.go
github-actions / golangci
[golangci] backend/scoreserver/admin/team_test.go#L53
admin_test.<anonymous> is missing field wants (exhaustruct)
Raw output
scoreserver/admin/team_test.go:53:17: admin_test.<anonymous> is missing field wants (exhaustruct)
"empty name": {
^
Check failure on line 91 in backend/scoreserver/admin/team_test.go
github-actions / golangci
[golangci] backend/scoreserver/admin/team_test.go#L91
adminv1.CreateTeamResponse is missing field Team (exhaustruct)
Raw output
scoreserver/admin/team_test.go:91:30: adminv1.CreateTeamResponse is missing field Team (exhaustruct)
cmpopts.IgnoreUnexported(adminv1.CreateTeamResponse{}, adminv1.Team{}),
^
Check failure on line 108 in backend/scoreserver/admin/team_test.go
github-actions / golangci
[golangci] backend/scoreserver/admin/team_test.go#L108
admin_test.<anonymous> is missing field wantCode (exhaustruct)
Raw output
scoreserver/admin/team_test.go:108:9: admin_test.<anonymous> is missing field wantCode (exhaustruct)
"ok": {
^
Check failure on line 137 in backend/scoreserver/admin/team_test.go
github-actions / golangci
[golangci] backend/scoreserver/admin/team_test.go#L137
adminv1.ListTeamsResponse is missing field Teams (exhaustruct)
Raw output
scoreserver/admin/team_test.go:137:30: adminv1.ListTeamsResponse is missing field Teams (exhaustruct)
cmpopts.IgnoreUnexported(adminv1.ListTeamsResponse{}, adminv1.Team{}),
^
Check failure on line 154 in backend/scoreserver/admin/team_test.go
github-actions / golangci
[golangci] backend/scoreserver/admin/team_test.go#L154
admin_test.<anonymous> is missing field wantCode (exhaustruct)
Raw output
scoreserver/admin/team_test.go:154:14: admin_test.<anonymous> is missing field wantCode (exhaustruct)
"by code": {
^
Check failure on line 182 in backend/scoreserver/admin/team_test.go
github-actions / golangci
[golangci] backend/scoreserver/admin/team_test.go#L182
adminv1.GetTeamResponse is missing field Team (exhaustruct)
Raw output
scoreserver/admin/team_test.go:182:30: adminv1.GetTeamResponse is missing field Team (exhaustruct)
cmpopts.IgnoreUnexported(adminv1.GetTeamResponse{}, adminv1.Team{}),
^
Check failure on line 200 in backend/scoreserver/admin/team_test.go
github-actions / golangci
[golangci] backend/scoreserver/admin/team_test.go#L200
adminv1.UpdateTeamRequest is missing field UpdateMask (exhaustruct)
Raw output
scoreserver/admin/team_test.go:200:9: adminv1.UpdateTeamRequest is missing field UpdateMask (exhaustruct)
in: &adminv1.UpdateTeamRequest{
^