From ec8f03e1f557a0e24380ab4763d937a22e9d4a1c Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 26 Jan 2023 23:09:37 -0700 Subject: .golangci.yml: Turn on 'dupl', fix --- .golangci.yml | 1 - internal/parse.go | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) 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", -- cgit v1.2.3-2-g168b