From 3841f05ba43a6d31dac623fd11e6258422235089 Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Tue, 3 Nov 2020 20:43:59 +0100 Subject: [PATCH] Update linter config Signed-off-by: Mark Sagi-Kazar --- .golangci.yml | 112 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 73 insertions(+), 39 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index ac9134bf..77ca3290 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,45 +1,79 @@ run: - timeout: 2m + timeout: 2m linters-settings: - golint: - min-confidence: 0.1 - goimports: - local-prefixes: github.com/dexidp/dex + gci: + local-prefixes: github.com/dexidp/dex + goimports: + local-prefixes: github.com/dexidp/dex + golint: + min-confidence: 0 + linters: - disable-all: true - enable: - - bodyclose - - deadcode - - depguard - - dogsled - - gochecknoinits - - gofmt - - goimports - - golint - - gosimple - - gocritic - - govet - - ineffassign - - interfacer - - misspell - - nakedret - - staticcheck - - structcheck - - stylecheck - - typecheck - - unconvert - - unused - - varcheck - - whitespace + disable-all: true + enable: + - bodyclose + - deadcode + - dogsled + - exhaustive + - exportloopref + - gochecknoinits + - gocritic + - gofmt + - goimports + - golint + - goprintffuncname + - gosimple + - govet + - ineffassign + - misspell + - nakedret + - nolintlint + - rowserrcheck + - staticcheck + - structcheck + - stylecheck + - typecheck + - unconvert + - unused + - varcheck + - whitespace - # TODO: fix linter errors before enabling - # - unparam - # - scopelint - # - gosec - # - gocyclo - # - lll - # - goconst - # - errcheck - # - dupl + # TODO: fix linter errors before enabling + # - gci + # - gochecknoglobals + # - gocognit + # - godot + # - gofumpt + # - nlreturn + # - noctx + # - prealloc + # - sqlclosecheck + + # TODO: fix linter errors before enabling (from original config) + # - dupl + # - errcheck + # - goconst + # - gocyclo + # - gosec + # - lll + # - scopelint + # - unparam + + # unused + # - depguard + # - goheader + # - gomodguard + + # don't enable: + # - asciicheck + # - funlen + # - godox + # - goerr113 + # - gomnd + # - interfacer + # - maligned + # - nestif + # - testpackage + # - wsl