aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-08-08 19:56:11 +0900
committernsfisis <nsfisis@gmail.com>2024-08-08 19:56:11 +0900
commit561d381da06c2fdb66e99016a2cbee5e1b0cf77a (patch)
treecb208adf562b5d057f19510b49fdb9d2c81b5e1c
parentc5e51c90af28e9cf54f3105c701dde2c5bcd9ae1 (diff)
downloadiosdc-japan-2024-albatross-561d381da06c2fdb66e99016a2cbee5e1b0cf77a.tar.gz
iosdc-japan-2024-albatross-561d381da06c2fdb66e99016a2cbee5e1b0cf77a.tar.zst
iosdc-japan-2024-albatross-561d381da06c2fdb66e99016a2cbee5e1b0cf77a.zip
feat(backend/worker): enable `unused`, `gofmt` and `goimports` in `golangci-lint`
-rw-r--r--backend/.golangci.yml3
-rw-r--r--backend/Makefile5
-rw-r--r--backend/game/message.go4
-rw-r--r--worker/Makefile5
4 files changed, 7 insertions, 10 deletions
diff --git a/backend/.golangci.yml b/backend/.golangci.yml
index de5164c..7832fa2 100644
--- a/backend/.golangci.yml
+++ b/backend/.golangci.yml
@@ -1,7 +1,10 @@
linters:
disable-all: true
enable:
+ - gofmt
+ - goimports
- gosimple
- govet
- ineffassign
- staticcheck
+ - unused
diff --git a/backend/Makefile b/backend/Makefile
index e3ac844..e9bc5a6 100644
--- a/backend/Makefile
+++ b/backend/Makefile
@@ -1,6 +1,5 @@
-.PHONY: fmt
-fmt:
- go fmt ./...
+.PHONY: all
+all: check lint
.PHONY: check
check:
diff --git a/backend/game/message.go b/backend/game/message.go
index 1eedabd..031222d 100644
--- a/backend/game/message.go
+++ b/backend/game/message.go
@@ -22,8 +22,6 @@ type playerMessageC2SWithClient struct {
message playerMessageC2S
}
-type playerMessage = api.GamePlayerMessage
-
type playerMessageS2C = interface{}
type playerMessageS2CPrepare = api.GamePlayerMessageS2CPrepare
type playerMessageS2CPreparePayload = api.GamePlayerMessageS2CPreparePayload
@@ -89,5 +87,3 @@ type watcherMessageS2CStart = api.GameWatcherMessageS2CStart
type watcherMessageS2CStartPayload = api.GameWatcherMessageS2CStartPayload
type watcherMessageS2CCode = api.GameWatcherMessageS2CCode
type watcherMessageS2CCodePayload = api.GameWatcherMessageS2CCodePayload
-type watcherMessageS2CExecResult = api.GameWatcherMessageS2CExecResult
-type watcherMessageS2CExecResultPayload = api.GameWatcherMessageS2CExecResultPayload
diff --git a/worker/Makefile b/worker/Makefile
index ad15562..6ee4f47 100644
--- a/worker/Makefile
+++ b/worker/Makefile
@@ -1,6 +1,5 @@
-.PHONY: fmt
-fmt:
- go fmt ./...
+.PHONY: all
+all: check lint
.PHONY: check
check: