summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-01-26 23:09:37 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-01-29 02:14:51 -0700
commitec8f03e1f557a0e24380ab4763d937a22e9d4a1c (patch)
tree3547e01be81ac868e6858d4b1ff818ca4776c815
parent67b6b99dde3d7a887a73df25b4cd885e8bdcf2de (diff)
.golangci.yml: Turn on 'dupl', fix
-rw-r--r--.golangci.yml1
-rw-r--r--internal/parse.go4
2 files changed, 4 insertions, 1 deletions
diff --git a/.golangci.yml b/.golangci.yml
index 9e1a999..73a16ca 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -45,7 +45,6 @@ linters:
# These are disabled not because I think they're bad, but because
# they currently don't pass, and I haven't really evaluated them
# yet.
- - dupl
- dupword
- errorlint
- exhaustive
diff --git a/internal/parse.go b/internal/parse.go
index 70e793e..d917d9d 100644
--- a/internal/parse.go
+++ b/internal/parse.go
@@ -73,6 +73,8 @@ const (
)
// GoString implements fmt.GoStringer.
+//
+//nolint:dupl // False positive due to similarly shaped AST.
func (t RuneType) GoString() string {
str, ok := map[RuneType]string{
RuneTypeError: "RuneTypeError",
@@ -133,6 +135,8 @@ func (t RuneType) GoString() string {
}
// String implements fmt.Stringer.
+//
+//nolint:dupl // False positive due to similarly shaped AST.
func (t RuneType) String() string {
str, ok := map[RuneType]string{
RuneTypeError: "x",