Skip to content

Instantly share code, notes, and snippets.

@sonatard
Created July 7, 2020 08:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sonatard/b01bee50f6f9a06f7eeaedc8aeed07f5 to your computer and use it in GitHub Desktop.
Save sonatard/b01bee50f6f9a06f7eeaedc8aeed07f5 to your computer and use it in GitHub Desktop.
# See https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
run:
linters-settings:
govet:
enable-all: true
disable:
- shadow
unused:
check-exported: true
unparam:
check-exported: true
varcheck:
exported-fields: false # TODO: 何故かtrueにしたとき使っている変数も使っていないことになるのでfalse
structcheck:
exported-fields: true
nakedret:
max-func-lines: 1
linters:
enable-all: true
disable:
- testpackage
- nestif
- godot
- wsl
- lll
- dupl
- funlen
- gochecknoinits
- gochecknoglobals
- godox
- maligned
- gocognit
- gocyclo
- interfacer
- gomnd
# 本当は有効にしたいがerrors.Newとfmt.Errorfを警告するのでとりあえずオフ
- goerr113
fast: false
# 以下で個別に無視したいところはオフにする
issues:
exclude-rules:
# Test
- path: _test\.go
text: "Using the variable on range scope `tt` in function literal" # キャプチャしないと警告がでるが問題ないなのでoff
linters:
- scopelint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment