You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
timeout: 30m# big timeout as github actions are sloow
3
3
allow-parallel-runners: true
4
4
linters:
5
-
disable-all: true
5
+
default: none
6
6
enable:
7
-
- errcheck # Errcheck is a program for checking for unchecked errors in Go code. These unchecked errors can be critical bugs in some cases
8
-
- gosimple # Linter for Go source code that specializes in simplifying code
9
-
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.
10
-
- ineffassign # Detects when assignments to existing variables are not used
11
-
- 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.
12
-
- typecheck # like the front-end of a Go compiler, parses and type-checks Go code
13
-
- unused # Checks Go code for unused constants, variables, functions and types.
14
-
- bodyclose # Checks whether HTTP response body is closed successfully.
15
-
- decorder # Check declaration order and count of types, constants, variables and functions.
16
-
- dogsled # Checks assignments with too many blank identifiers (e.g. x, , , _, := f()).
17
-
- dupword # Checks for duplicate words in the source code
18
-
- durationcheck # Check for two durations multiplied together.
19
-
- errchkjson # Checks types passed to the json encoding functions. Reports unsupported types and optionally reports occasions, where the check for the returned error can be omitted.
20
-
- errname # Checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error.
21
-
- 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.
7
+
- bodyclose
22
8
- copyloopvar
23
-
- gocheckcompilerdirectives # Checks that go compiler directive comments (//go:) are valid.
24
-
- gocognit # Computes and checks the cognitive complexity of functions.
25
-
- goconst # Finds repeated strings that could be replaced by a constant.
26
-
- gocritic # Provides diagnostics that check for bugs, performance and style issues.
27
-
- gocyclo # Computes and checks the cyclomatic complexity of functions.
28
-
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification.
29
-
- importas # Enforces consistent import
30
-
- interfacebloat # A linter that checks the number of methods inside an interface.
31
-
- lll # Reports long lines.
32
-
- makezero # Finds slice declarations with non-zero initial length.
33
-
- misspell # Finds commonly misspelled English words in comments.
34
-
- nakedret # Finds naked returns in functions greater than a specified function length.
35
-
- nestif # Reports deeply nested if statements.
36
-
- noctx # Noctx finds sending http request without context.Context.
37
-
- prealloc # Finds slice declarations that could potentially be pre-allocated.
38
-
- predeclared # Find code that shadows one of Go's predeclared identifiers.
39
-
- reassign # Checks that package variables are not reassigned.
40
-
- tenv # Tenv is analyzer that detects using os.Setenv instead of t.Setenv since Go1.17.
41
-
- unconvert # Remove unnecessary type conversions.
42
-
- unparam # Reports unused function parameters.
43
-
- usestdlibvars # A linter that detect the possibility to use variables/constants from the Go standard library.
44
-
- whitespace # Tool for detection of leading and trailing whitespace.
45
-
linters-settings:
46
-
gocognit:
47
-
min-complexity: 30
48
-
govet:
49
-
# report about shadowed variables
50
-
check-shadowing: false
51
-
lll:
52
-
# Max line length, lines longer will be reported.
53
-
# '\t' is counted as 1 character by default, and can be changed with the tab-width option.
0 commit comments