From 223bebbf277479b438364983d885064e3e5e9631 Mon Sep 17 00:00:00 2001 From: Hayley Swimelar Date: Fri, 13 Dec 2019 12:15:29 -0800 Subject: [PATCH 1/3] .golangci.yaml add defaults back in to godoc --- assets/.golangci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/.golangci.yml b/assets/.golangci.yml index 80e4b79..3578adb 100644 --- a/assets/.golangci.yml +++ b/assets/.golangci.yml @@ -49,7 +49,6 @@ run: # the dependency descriptions in go.mod. # modules-download-mode: readonly|release|vendor - # output configuration options output: # colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number" @@ -61,7 +60,6 @@ output: # print linter name in the end of issue text, default is true print-linter-name: true - # all available settings of specific linters linters-settings: errcheck: @@ -204,6 +202,9 @@ linters-settings: # report any comments starting with keywords, this is useful for TODO or FIXME comments that # might be left in the code accidentally and should be resolved before merging keywords: # default keywords are TODO, BUG, and FIXME, these can be overwritten by this setting + - TODO + - BUG + - FIXME - NOTE - OPTIMIZE # marks code that should be optimized before merging - HACK # marks hack-arounds that should be removed before merging @@ -274,7 +275,6 @@ linters: # - maligned # - prealloc - issues: # List of regexps of issue texts to exclude, empty list by default. # But independently from this option we use default exclude patterns, From fe8978aa4fb95e6607fc7dadeff2c899010ff0dc Mon Sep 17 00:00:00 2001 From: Hayley Swimelar Date: Fri, 13 Dec 2019 12:17:48 -0800 Subject: [PATCH 2/3] .golangci.yml: run godox linter --- assets/.golangci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/.golangci.yml b/assets/.golangci.yml index 3578adb..a5715b7 100644 --- a/assets/.golangci.yml +++ b/assets/.golangci.yml @@ -246,6 +246,7 @@ linters: - gocognit - goconst - gocritic + - godox - gofmt - goimports - golint @@ -270,7 +271,6 @@ linters: # - gochecknoglobals # - gochecknoinits # - gocyclo - # - godox # - lll # - maligned # - prealloc From ec510fe656b21692aea7765d64273cf4646cb184 Mon Sep 17 00:00:00 2001 From: Hayley Swimelar Date: Fri, 13 Dec 2019 12:52:28 -0800 Subject: [PATCH 3/3] .golangci.yml: disable varcheck and deadcode varcheck and deadcode conflict with unused, creating a different output file (reporting the same errors) on different runs. With code-climate reporting, this can result in an equal number of false positives and false negatives when comparing successive runs, with no node changes. --- assets/.golangci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/.golangci.yml b/assets/.golangci.yml index a5715b7..b6d1770 100644 --- a/assets/.golangci.yml +++ b/assets/.golangci.yml @@ -237,7 +237,6 @@ linters: disable-all: true enable: - bodyclose - - deadcode - depguard - dogsled - dupl @@ -265,15 +264,16 @@ linters: - unconvert - unparam - unused - - varcheck - whitespace # don't enable: + # - deadcode # - gochecknoglobals # - gochecknoinits # - gocyclo # - lll # - maligned # - prealloc + # - varcheck issues: # List of regexps of issue texts to exclude, empty list by default.