Skip to content

Instantly share code, notes, and snippets.

@MegaBlackLabel
Forked from sonatard/.golangci.yml
Created July 7, 2020 08:52
Show Gist options
  • Save MegaBlackLabel/269c66f965777385341fe77a168aa95e to your computer and use it in GitHub Desktop.
Save MegaBlackLabel/269c66f965777385341fe77a168aa95e 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