Skip to content

Commit 9327ea8

Browse files
author
tkc
committed
Add linter setting
1 parent 2d67495 commit 9327ea8

File tree

1 file changed

+106
-0
lines changed

1 file changed

+106
-0
lines changed

.golangci.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
linters-settings:
2+
# depguard:
3+
# list-type: blacklist
4+
# packages:
5+
# - github.com/sirupsen/logrus
6+
# packages-with-error-message:
7+
# - {github.com/sirupsen/logrus: 'logging is allowed only by logutils.Log'}
8+
# dupl:
9+
# threshold: 100
10+
funlen:
11+
lines: 500
12+
statements: 50
13+
# goconst:
14+
# min-len: 2
15+
# min-occurrences: 2
16+
# gocritic:
17+
# enabled-tags:
18+
# - diagnostic
19+
# - experimental
20+
# - opinionated
21+
# - performance
22+
# - style
23+
# disabled-checks:
24+
# - dupImport
25+
# - ifElseChain
26+
# - octalLiteral
27+
# - whyNoLint
28+
# - wrapperFunc
29+
# gocyclo:
30+
# min-complexity: 15
31+
# goimports:
32+
# local-prefixes: github.com/golangci/golangci-lint
33+
# golint:
34+
# min-conf: 0
35+
# gomnd:
36+
# settings:
37+
# mnd: {checks: 'argument,case,condition,return'}
38+
# govet:
39+
# check-shadowing: true
40+
# settings:
41+
# printf: {funcs: [(github.com/golangci/golangci-lint/pkg/logutils.Log).Infof, (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf, (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf, (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf]}
42+
# lll:
43+
# line-length: 140
44+
# maligned:
45+
# suggest-new: true
46+
# misspell:
47+
# locale: US
48+
# dogsled:
49+
# max-blank-identifiers: 5
50+
51+
linters:
52+
disable-all: true
53+
enable:
54+
- bodyclose
55+
- deadcode
56+
- depguard
57+
- dogsled
58+
- dupl
59+
- errcheck
60+
- funlen
61+
- gochecknoinits
62+
- goconst
63+
- gocritic
64+
- gocyclo
65+
- gofmt
66+
- goimports
67+
- golint
68+
- gomnd
69+
- goprintffuncname
70+
- gosec
71+
- gosimple
72+
- govet
73+
- ineffassign
74+
- interfacer
75+
# - lll
76+
- misspell
77+
- nakedret
78+
- rowserrcheck
79+
- scopelint
80+
- staticcheck
81+
- structcheck
82+
- stylecheck
83+
- typecheck
84+
- unconvert
85+
- unparam
86+
- unused
87+
- varcheck
88+
- whitespace
89+
90+
# issues:
91+
# exclude-rules:
92+
# -
93+
# path: _test\.go
94+
# linters: [gomnd]
95+
96+
# run:
97+
# skip-dirs:
98+
# - test/testdata_etc
99+
# - internal/cache
100+
# - internal/renameio
101+
# - internal/robustio
102+
103+
# service:
104+
# golangci-lint-version: 1.23.x
105+
# prepare:
106+
# - 'echo "here I can run custom commands, but no preparation needed for this repo"'

0 commit comments

Comments
 (0)