-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yaml
67 lines (60 loc) · 3.32 KB
/
.golangci.yaml
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
run:
skip-dirs:
- examples
concurrency: 4
timeout: 2m
linters-settings:
govet:
check-shadowing: true
gocyclo:
min-complexity: 15
gofmt:
simplify: true
goimports:
local-prefixes: github.com/acciaioli/mono
linters:
# https://github.com/golangci/golangci-lint#supported-linters
disable-all: true
enable:
# https://github.com/golangci/golangci-lint#supported-linters
# - bodyclose # checks whether HTTP response body is closed successfully
# - depguard # Go linter that checks if package imports are in a list of acceptable packages
# - dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
# - dupl # Tool for code clone detection
# - funlen # Tool for detection of long functions
# - gochecknoglobals # Checks that no globals are present in Go code
# - gochecknoinits # Checks that no init functions are present in Go code
# - gocognit # Computes and checks the cognitive complexity of functions
- goconst # Finds repeated strings that could be replaced by a constant
# - gocritic # The most opinionated Go source code linter
- gocyclo # Computes and checks the cyclomatic complexity of functions
# - godox # Tool for detection of fix-me, to-do and other comment keywords
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
- goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
# - golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
# - gomnd # An analyzer to detect magic numbers.
# - goprintffuncname # Checks that printf-like functions are named with f at the end
- gosec # Inspects source code for security problems
# - interfacer # Linter that suggests narrower interface types
- lll # Reports long lines
# - maligned # Tool to detect Go structs that would take less memory if their fields were sorted
- misspell # Finds commonly misspelled English words in comments
# - nakedret # Finds naked returns in functions greater than a specified function length
# - prealloc # Finds slice declarations that could potentially be preallocated
# - rowserrcheck # checks whether Err of rows is checked successfully
# - scopelint # Scopelint checks for unpinned variables in go programs
# - stylecheck # Stylecheck is a replacement for golint
# - unconvert # Remove unnecessary type conversions
# - unparam # Reports unused function parameters
- whitespace # Tool for detection of leading and trailing whitespace
# - wsl # Whitespace Linter
fast: false
#issues:
# # Independently from option `exclude` we use default exclude patterns,
# # it can be disabled by this option. To list all
# # excluded by default patterns execute `golangci-lint run --help`.
# # Default value for this option is true.
# exclude-use-default: true
# exclude:
# - "File is not `goimports`-ed"
# - "is unused"