-
Notifications
You must be signed in to change notification settings - Fork 5
/
.golangci.yml
42 lines (37 loc) · 2.04 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
linters-settings:
misspell:
locale: US
lll:
line-length: 140
# https://golangci-lint.run/usage/linters/
linters:
disable-all: true
enable:
# default
- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
- gosimple # Linter for Go source code that specializes in simplifying code
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
- ineffassign # Detects when assignments to existing variables are not used
- staticcheck # It's a set of rules from staticcheck. It's not the same thing as the staticcheck binary. The author of staticcheck doesn't support or approve the use of staticcheck as a library inside golangci-lint.
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
- unused # Checks Go code for unused constants, variables, functions and types
# customize
- execinquery # execinquery is a linter about query string checker in Query function which reads your Go src files and warning it finds
# - errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.
- bodyclose # checks whether HTTP response body is closed successfully
- errname # Checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error.
- unconvert # Remove unnecessary type conversions
- whitespace # Tool for detection of leading and trailing whitespace
# - gofumpt # Gofumpt checks whether code was gofumpt-ed.
# - lll # Reports long lines
- misspell # Finds commonly misspelled English words in comments
# - usestdlibvars # A linter that detect the possibility to use variables/constants from the Go standard library.
# - revive
run:
timeout: 5m
issues:
exclude-rules:
# Exclude some `staticcheck` messages.
- linters:
- staticcheck
text: "SA1019:"