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
Copy file name to clipboardExpand all lines: .golangci.yml
+28-44Lines changed: 28 additions & 44 deletions
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,18 @@
2
2
# Golang CI pipeline configuration
3
3
#
4
4
# To execute linters in local the ./scripts/lint.sh script can be used.
5
+
version: "2"
6
+
7
+
formatters:
8
+
enable:
9
+
- gci # Gci controls golang package import order and makes it always deterministic. [fast: true, auto-fix: false]
10
+
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification [fast: true, auto-fix: true]
- goimports # In addition to fixing imports, goimports also formats your code in the same style as gofmt. [fast: true, auto-fix: true]
13
+
- golines
5
14
6
15
linters:
16
+
default: none
7
17
# Run golangci-lint linters to see the list of all linters
8
18
# Please keep them sorted alphabetically
9
19
enable:
@@ -16,25 +26,18 @@ linters:
16
26
- decorder # check declaration order and count of types, constants, variables and functions [fast: true, auto-fix: false]
17
27
- dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f()) [fast: true, auto-fix: false]
18
28
- durationcheck # check for two durations multiplied together [fast: false, auto-fix: false]
19
-
- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases [fast: false, auto-fix: false]
20
29
- 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. [fast: false, auto-fix: false]
21
30
- errname # Checks that sentinel errors are prefixed with the `Err` and error types are suffixed with the `Error`. [fast: false, auto-fix: false]
22
31
- exptostd # Detects functions from golang.org/x/exp/ that can be replaced by std functions. [auto-fix]
23
-
- gci # Gci controls golang package import order and makes it always deterministic. [fast: true, auto-fix: false]
24
32
- gocheckcompilerdirectives # Checks that go compiler directive comments (//go:) are valid. [fast: true, auto-fix: false]
25
33
- gochecksumtype # Run exhaustiveness checks on Go "sum types" [fast: false, auto-fix: false]
26
34
- goconst # Finds repeated strings that could be replaced by a constant [fast: true, auto-fix: false]
27
35
- gocritic # Provides diagnostics that check for bugs, performance and style issues. [fast: false, auto-fix: false]
28
36
- gocyclo # Computes and checks the cyclomatic complexity of functions [fast: true, auto-fix: false]
29
-
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification [fast: true, auto-fix: true]
- goheader # Checks is file header matches to pattern [fast: true, auto-fix: false]
32
-
- goimports # In addition to fixing imports, goimports also formats your code in the same style as gofmt. [fast: true, auto-fix: true]
33
38
- gomoddirectives # Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod. [fast: true, auto-fix: false]
34
39
- gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations. [fast: true, auto-fix: false]
35
40
- goprintffuncname # Checks that printf-like functions are named with `f` at the end [fast: true, auto-fix: false]
- gosimple #(megacheck): Linter for Go source code that specializes in simplifying a code [fast: false, auto-fix: false]
38
41
- govet #(vet, vetshadow): Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string [fast: false, auto-fix: false]
39
42
- grouper # An analyzer to analyze expression groups. [fast: true, auto-fix: false]
- 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. [fast: false, auto-fix: false]
0 commit comments