reviewdog [golangci] report
reported by reviewdog 🐶
Findings (23)
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/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/pkg/pgtest/pgtest.go|88| pkg/pgtest/pgtest.go:88: Line contains TODO/BUG/FIXME: "TODO: startContainer を使って DB を起動し,tb.Cle..." (godox)
backend/cmd/ictscli/cmd/team/create.go|54 col 28| Error return value of createCmd.MarkFlagRequired
is not checked (errcheck)
backend/cmd/ictscli/cmd/team/create.go|55 col 28| Error return value of createCmd.MarkFlagRequired
is not checked (errcheck)
backend/cmd/ictscli/cmd/team/create.go|56 col 28| Error return value of createCmd.MarkFlagRequired
is not checked (errcheck)
backend/cmd/ictscli/cmd/team/delete.go|44 col 28| Error return value of deleteCmd.MarkFlagRequired
is not checked (errcheck)
backend/cmd/ictscli/cmd/team/get.go|44 col 25| Error return value of getCmd.MarkFlagRequired
is not checked (errcheck)
backend/cmd/ictscli/cmd/team/update.go|67 col 28| Error return value of updateCmd.MarkFlagRequired
is not checked (errcheck)
backend/cmd/ictscli/client/client.go|45 col 4| use of fmt.Printf
forbidden by pattern ^(fmt\.Print(|f|ln)|print|println)$
(forbidigo)
backend/cmd/ictscli/client/client.go|48 col 3| use of fmt.Println
forbidden by pattern ^(fmt\.Print(|f|ln)|print|println)$
(forbidigo)
backend/cmd/ictscli/cmd/team/create.go|36 col 4| use of fmt.Printf
forbidden by pattern ^(fmt\.Print(|f|ln)|print|println)$
(forbidigo)
backend/cmd/ictscli/cmd/team/create.go|42 col 4| use of fmt.Printf
forbidden by pattern ^(fmt\.Print(|f|ln)|print|println)$
(forbidigo)
backend/cmd/ictscli/cmd/team/list.go|31 col 5| use of fmt.Println
forbidden by pattern ^(fmt\.Print(|f|ln)|print|println)$
(forbidigo)
backend/cmd/ictscli/cmd/team/list.go|35 col 4| use of fmt.Println
forbidden by pattern ^(fmt\.Print(|f|ln)|print|println)$
(forbidigo)
backend/cmd/ictscli/cmd/team/create.go|50 col 1| don't use init
function (gochecknoinits)
backend/cmd/ictscli/cmd/team/delete.go|42 col 1| don't use init
function (gochecknoinits)
backend/cmd/ictscli/cmd/team/get.go|42 col 1| don't use init
function (gochecknoinits)
backend/cmd/ictscli/cmd/root.go|12| File is not gofmt
-ed with -s
(gofmt)
backend/cmd/ictscli/cmd/team/update.go|24 col 47| string literal contains rune in Han script (gosmopolitan)
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 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 88 in backend/pkg/pgtest/pgtest.go
github-actions / golangci
[golangci] backend/pkg/pgtest/pgtest.go#L88
pkg/pgtest/pgtest.go:88: Line contains TODO/BUG/FIXME: "TODO: startContainer を使って DB を起動し,tb.Cle..." (godox)
Raw output
pkg/pgtest/pgtest.go:88: pkg/pgtest/pgtest.go:88: Line contains TODO/BUG/FIXME: "TODO: startContainer を使って DB を起動し,tb.Cle..." (godox)
// TODO: startContainer を使って DB を起動し,tb.Cleanup で停止する
Check failure on line 54 in backend/cmd/ictscli/cmd/team/create.go
github-actions / golangci
[golangci] backend/cmd/ictscli/cmd/team/create.go#L54
Error return value of `createCmd.MarkFlagRequired` is not checked (errcheck)
Raw output
cmd/ictscli/cmd/team/create.go:54:28: Error return value of `createCmd.MarkFlagRequired` is not checked (errcheck)
createCmd.MarkFlagRequired("code")
^
Check failure on line 55 in backend/cmd/ictscli/cmd/team/create.go
github-actions / golangci
[golangci] backend/cmd/ictscli/cmd/team/create.go#L55
Error return value of `createCmd.MarkFlagRequired` is not checked (errcheck)
Raw output
cmd/ictscli/cmd/team/create.go:55:28: Error return value of `createCmd.MarkFlagRequired` is not checked (errcheck)
createCmd.MarkFlagRequired("name")
^
Check failure on line 56 in backend/cmd/ictscli/cmd/team/create.go
github-actions / golangci
[golangci] backend/cmd/ictscli/cmd/team/create.go#L56
Error return value of `createCmd.MarkFlagRequired` is not checked (errcheck)
Raw output
cmd/ictscli/cmd/team/create.go:56:28: Error return value of `createCmd.MarkFlagRequired` is not checked (errcheck)
createCmd.MarkFlagRequired("organization")
^
Check failure on line 44 in backend/cmd/ictscli/cmd/team/delete.go
github-actions / golangci
[golangci] backend/cmd/ictscli/cmd/team/delete.go#L44
Error return value of `deleteCmd.MarkFlagRequired` is not checked (errcheck)
Raw output
cmd/ictscli/cmd/team/delete.go:44:28: Error return value of `deleteCmd.MarkFlagRequired` is not checked (errcheck)
deleteCmd.MarkFlagRequired("code")
^
Check failure on line 44 in backend/cmd/ictscli/cmd/team/get.go
github-actions / golangci
[golangci] backend/cmd/ictscli/cmd/team/get.go#L44
Error return value of `getCmd.MarkFlagRequired` is not checked (errcheck)
Raw output
cmd/ictscli/cmd/team/get.go:44:25: Error return value of `getCmd.MarkFlagRequired` is not checked (errcheck)
getCmd.MarkFlagRequired("code")
^
Check failure on line 67 in backend/cmd/ictscli/cmd/team/update.go
github-actions / golangci
[golangci] backend/cmd/ictscli/cmd/team/update.go#L67
Error return value of `updateCmd.MarkFlagRequired` is not checked (errcheck)
Raw output
cmd/ictscli/cmd/team/update.go:67:28: Error return value of `updateCmd.MarkFlagRequired` is not checked (errcheck)
updateCmd.MarkFlagRequired("code")
^
Check failure on line 45 in backend/cmd/ictscli/client/client.go
github-actions / golangci
[golangci] backend/cmd/ictscli/client/client.go#L45
use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)
Raw output
cmd/ictscli/client/client.go:45:4: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)
fmt.Printf("Error marshaling JSON: %v\n", err)
^
Check failure on line 48 in backend/cmd/ictscli/client/client.go
github-actions / golangci
[golangci] backend/cmd/ictscli/client/client.go#L48
use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)
Raw output
cmd/ictscli/client/client.go:48:3: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)
fmt.Println(string(bytes))
^
Check failure on line 36 in backend/cmd/ictscli/cmd/team/create.go
github-actions / golangci
[golangci] backend/cmd/ictscli/cmd/team/create.go#L36
use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)
Raw output
cmd/ictscli/cmd/team/create.go:36:4: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)
fmt.Printf("Failed to create team: %v\n", err)
^
Check failure on line 42 in backend/cmd/ictscli/cmd/team/create.go
github-actions / golangci
[golangci] backend/cmd/ictscli/cmd/team/create.go#L42
use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)
Raw output
cmd/ictscli/cmd/team/create.go:42:4: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)
fmt.Printf("Successfully created team:\n")
^
Check failure on line 31 in backend/cmd/ictscli/cmd/team/list.go
github-actions / golangci
[golangci] backend/cmd/ictscli/cmd/team/list.go#L31
use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)
Raw output
cmd/ictscli/cmd/team/list.go:31:5: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)
fmt.Println("No teams found")
^
Check failure on line 35 in backend/cmd/ictscli/cmd/team/list.go
github-actions / golangci
[golangci] backend/cmd/ictscli/cmd/team/list.go#L35
use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)
Raw output
cmd/ictscli/cmd/team/list.go:35:4: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)
fmt.Println("Teams:")
^
Check failure on line 50 in backend/cmd/ictscli/cmd/team/create.go
github-actions / golangci
[golangci] backend/cmd/ictscli/cmd/team/create.go#L50
don't use `init` function (gochecknoinits)
Raw output
cmd/ictscli/cmd/team/create.go:50:1: don't use `init` function (gochecknoinits)
func init() {
^
Check failure on line 42 in backend/cmd/ictscli/cmd/team/delete.go
github-actions / golangci
[golangci] backend/cmd/ictscli/cmd/team/delete.go#L42
don't use `init` function (gochecknoinits)
Raw output
cmd/ictscli/cmd/team/delete.go:42:1: don't use `init` function (gochecknoinits)
func init() {
^
Check failure on line 42 in backend/cmd/ictscli/cmd/team/get.go
github-actions / golangci
[golangci] backend/cmd/ictscli/cmd/team/get.go#L42
don't use `init` function (gochecknoinits)
Raw output
cmd/ictscli/cmd/team/get.go:42:1: don't use `init` function (gochecknoinits)
func init() {
^
Check failure on line 12 in backend/cmd/ictscli/cmd/root.go
github-actions / golangci
[golangci] backend/cmd/ictscli/cmd/root.go#L12
File is not `gofmt`-ed with `-s` (gofmt)
Raw output
cmd/ictscli/cmd/root.go:12: File is not `gofmt`-ed with `-s` (gofmt)
baseURL string
useJSON bool
Check failure on line 24 in backend/cmd/ictscli/cmd/team/update.go
github-actions / golangci
[golangci] backend/cmd/ictscli/cmd/team/update.go#L24
string literal contains rune in Han script (gosmopolitan)
Raw output
cmd/ictscli/cmd/team/update.go:24:47: string literal contains rune in Han script (gosmopolitan)
Example: ictscli team update --code 1 --name "新トラブルシューターズ"`,
^