-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
75 lines (73 loc) · 2.1 KB
/
.golangci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# see https://github.com/golangci/golangci-lint#configuration
# https://raw.githubusercontent.com/NaturalSelectionLabs/RSS3-PreGod/develop/.golangci.yml
linters-settings:
godot:
exclude:
- "^@*" # exclude swagger annotations
tagliatelle:
case:
rules:
json: snake
lll:
line-length: 150
govet:
check-shadowing: true
unused:
check-exported: true
nolintlint:
require-explanation: true
require-specific: true
misspell:
# Correct spellings using locale preferences for US or UK.
# Setting locale to US will correct the British spelling of 'colour' to 'color'.
# Default is to use a neutral variety of English.
locale: US
ignore-words:
- someword
funlen:
lines: 80
statements: 50
gomoddirectives:
replace-allow-list:
- github.com/elastic/go-elasticsearch/v7
linters: # https://golangci-lint.run/usage/linters
disable:
- godox # TODO comments should be allowed
- gochecknoglobals # global vars should be allowed
- gomnd # magic numbers should be allowed
- scopelint # deprecated, replaced by exportloopref
- gochecknoinits # `init` functions should be] allowed
- gofumpt # too strict so far
- paralleltest # Not for our situation
- tparallel # Not for our situation
- execinquery # https://github.com/golangci/golangci-lint/issues/2835
enable:
- exportloopref # in replacement of scopelint
- deadcode # no dead code
- gosimple # for simplified code
- govet # reports suspicious constructs; e.g. Printf arguments alignment
- ineffassign # no ineffective assignments
- staticcheck # static analysis
- structcheck # no unused struct fields
- typecheck # type-checks Go code
- unused # no unused vars, fns, etc.
- varcheck # no unused global vars
- nolintlint
- misspell # finds commonly misspelled English words in comments
- funlen
- lll # reports long lines
presets:
- bugs
- comment
- complexity
- error
- format
- import
- metalinter
- module
- performance
- sql
- style
- test
- unused
fast: true