-
Notifications
You must be signed in to change notification settings - Fork 3
/
.golangci.yml
94 lines (85 loc) · 2.64 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
run:
# Timeout for analysis, e.g. 30s, 5m.
timeout: 5m
# Include test files.
tests: true
# List of build tags to pass to all linters.
build-tags:
- integration
issues:
# Set to 0 to not skip any issues.
max-issues-per-linter: 0
# Set to 0 to not skip any issues.
max-same-issues: 0
output:
# Sort results by: filepath, then line, then column.
sort-results: true
# Make issues output unique by line.
uniq-by-line: false
linters:
# Enable specific linter
enable:
# Detect context.Context contained in structs.
- containedctx
# Check whether a function uses a non-inherited context.
- contextcheck
# Find declarations and assignments with too many blank identifiers.
- dogsled
# Check for unchecked errors.
- errcheck
# Find code that will cause problems with the error wrapping scheme.
- errorlint
# Inspects source code for security problems.
- gosec
# Check that compiler directives are valid.
- gocheckcompilerdirectives
# Calculate cognitive complexities of functions.
- gocognit
# Find repeated strings that could be replaced by a constant.
- goconst
# Provides functionalities missing from other linters.
- gocritic
# Calculates cyclomatic complexity of a function.
- gocyclo
# Check if comments end with a dot.
- godot
# A stricter replacement for gofmt.
- gofumpt
# Simplify the code.
- gosimple
# Check for correctness of programs.
- govet
# Detect ineffectual assignments.
- ineffassign
# Correct commonly misspelled English words in source files.
- misspell
# Magic Number Detector.
- mnd
# Finds the code that returns nil even if it checks that the error is not nil.
- nilerr
# Checks that there is no simultaneous return of nil error and an invalid value.
- nilnil
# Find incorrect usages of t.Parallel().
- paralleltest
# Reports direct reads from proto message fields when getters should be used.
- protogetter
# Drop-in replacement of golint.
- revive
# Ensure consistent code style when using log/slog.
- sloglint
# Find bugs and performance issues statically.
- staticcheck
# Checks Go code for unused constants, variables, functions and types.
- unused
# Empty lines linter.
- wsl
# Setting of specific linters.
linters-settings:
paralleltest:
# Ignore missing calls to `t.Parallel()` and only report incorrect uses of it.
ignore-missing: false
sloglint:
# Enforce using key-value pairs only (incompatible with attr-only).
kv-only: true
# Enforce a single key naming convention.
key-naming-case: snake