diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..c6390d7 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,67 @@ +# Taken from https://github.com/analog-apps/spotify-viewer +linters-settings: + errcheck: + check-type-assertions: true + goconst: + min-len: 2 + min-occurrences: 3 + gocritic: + enabled-tags: + - diagnostic + - experimental + - opinionated + - performance + - style + govet: + shadow: true + enable: + - fieldalignment + nolintlint: + require-explanation: true + require-specific: true + +linters: + disable-all: true + enable: + - bodyclose + # TODO: Enable later when you have time to configure + # - depguard + - dogsled + - dupl + - errcheck + - exportloopref + - exhaustive + - goconst + - gocritic + - gofmt + - goimports + - gomnd + - gocyclo + - gosec + - gosimple + - govet + - ineffassign + - misspell + - nolintlint + - nakedret + - prealloc + - predeclared + - revive + - staticcheck + - stylecheck + - thelper + - tparallel + - typecheck + - unconvert + - unparam + - unused + - whitespace + - wsl +issues: + exclude-rules: + - linters: + - gocritic + text: "sloppyReassign:" + +run: + issues-exit-code: 1