Skip to content

Instantly share code, notes, and snippets.

@irwinby
Created July 8, 2022 17:00
Show Gist options
  • Save irwinby/b69c6890615cf4ce45369ac4b7de71d4 to your computer and use it in GitHub Desktop.
Save irwinby/b69c6890615cf4ce45369ac4b7de71d4 to your computer and use it in GitHub Desktop.
GolangCI config for the Go application
run:
timeout: 3m
go: "1.18"
linters:
disable-all: true
enable:
- deadcode
- depguard
- dogsled
- dupl
- errcheck
- exportloopref
- funlen
- gochecknoinits
- goconst
- gocritic
- gocyclo
- gofmt
- goimports
- gomnd
- goprintffuncname
- gosec
- govet
- ineffassign
- lll
- misspell
- nakedret
- nolintlint
- typecheck
- unconvert
- varcheck
- whitespace
- wsl
- revive
linters-settings:
goimports:
local-prefixes: github.com/{ORGANIZATION_NAME}/{REPOSITORY_NAME}
misspell:
locale: US
lll:
line-length: 150
issues:
exclude-rules:
- path: _test\.go
linters:
- dupl
- funlen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment