diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index d6b63f6d..5ca01046 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -1,4 +1,4 @@ -name: Test & Lint +name: Review Dog on: push: diff --git a/dice/censor/trie.go b/dice/censor/trie.go index 53197739..8cdd043c 100644 --- a/dice/censor/trie.go +++ b/dice/censor/trie.go @@ -57,7 +57,7 @@ func (t *trie) Match(text string) (sensitiveWords map[string]Level) { sensitiveWords = map[string]Level{} chars := []rune(text) - for i := range len(chars) { + for i := range chars { cur := t.root.findChild(chars[i]) if cur == nil { continue diff --git a/dice/dice_jsvm_test.go b/dice/dice_jsvm_test.go index 596026a7..749c3b71 100644 --- a/dice/dice_jsvm_test.go +++ b/dice/dice_jsvm_test.go @@ -247,7 +247,7 @@ func sameScriptInfos(a []*JsScriptInfo, b []*JsScriptInfo) bool { if len(a) != len(b) { return false } - for i := range len(a) { + for i := range a { if !sameScriptInfo(a[i], b[i]) { return false } diff --git a/dice/platform_adapter_gocq.go b/dice/platform_adapter_gocq.go index 15e6bf0d..b7ac4664 100644 --- a/dice/platform_adapter_gocq.go +++ b/dice/platform_adapter_gocq.go @@ -698,7 +698,7 @@ func (pa *PlatformAdapterGocq) Serve() int { if len(m2) == len(items) { ok := true - for i := range len(m2) { + for i := range m2 { if m2[i] != items[i] { ok = false break diff --git a/dice/platform_adapter_walleq.go b/dice/platform_adapter_walleq.go index 471b27b9..47d0a126 100644 --- a/dice/platform_adapter_walleq.go +++ b/dice/platform_adapter_walleq.go @@ -491,7 +491,7 @@ func (pa *PlatformAdapterWalleQ) Serve() int { if len(m2) == len(items) { ok := true - for i := range len(m2) { + for i := range m2 { if m2[i] != items[i] { ok = false break diff --git a/dice/rollvm.go b/dice/rollvm.go index 3092b3ad..4e06ac74 100644 --- a/dice/rollvm.go +++ b/dice/rollvm.go @@ -1337,7 +1337,7 @@ func (e *RollExpression) Evaluate(_ *Dice, ctx *MsgContext) (*VMStack, string, e } text := "{" - for i := range len(nums) { + for i := range nums { if int64(i) == diceKQ { text += "| " }