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
+25-17Lines changed: 25 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,16 @@
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
+
formatters:
7
+
enable:
8
+
- gci # Gci controls golang package import order and makes it always deterministic. [fast: true, auto-fix: false]
9
+
- 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]
5
12
6
13
linters:
7
-
disable-all: true
8
-
9
-
# Run golangci-lint linters to see
14
+
default: none
10
15
enable:
11
16
- asasalint # check for pass []any as any in variadic func(...any) [fast: false, auto-fix: false]
12
17
- asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers [fast: true, auto-fix: false]
@@ -21,20 +26,15 @@ linters:
21
26
- 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]
22
27
- 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]
23
28
- errname # Checks that sentinel errors are prefixed with the `Err` and error types are suffixed with the `Error`. [fast: false, auto-fix: false]
24
-
- gci # Gci controls golang package import order and makes it always deterministic. [fast: true, auto-fix: false]
25
29
- gocheckcompilerdirectives # Checks that go compiler directive comments (//go:) are valid. [fast: true, auto-fix: false]
26
30
- gochecksumtype # Run exhaustiveness checks on Go "sum types" [fast: false, auto-fix: false]
27
31
- goconst # Finds repeated strings that could be replaced by a constant [fast: true, auto-fix: false]
28
32
- gocritic # Provides diagnostics that check for bugs, performance and style issues. [fast: false, auto-fix: false]
29
33
- gocyclo # Computes and checks the cyclomatic complexity of functions [fast: true, auto-fix: false]
30
-
- 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]
33
-
- goimports # In addition to fixing imports, goimports also formats your code in the same style as gofmt. [fast: true, auto-fix: true]
34
35
- gomoddirectives # Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod. [fast: true, auto-fix: false]
35
36
- 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]
36
37
- goprintffuncname # Checks that printf-like functions are named with `f` at the end [fast: true, auto-fix: false]
37
-
- gosimple #(megacheck): Linter for Go source code that specializes in simplifying a code [fast: false, auto-fix: false]
38
38
- grouper # An analyzer to analyze expression groups. [fast: true, auto-fix: false]
testhelpers.Assert(t, createServerResponse.Server!=nil, "Should have server in response")
51
-
testhelpers.Assert(t, 1==len(createServerResponse.Server.Volumes), "should have exactly one volume because we didn't pass volumes map in the requests.")
51
+
testhelpers.Assert(t, len(createServerResponse.Server.Volumes)==1, "should have exactly one volume because we didn't pass volumes map in the requests.")
testhelpers.Assert(t, 1==len(updateServerResponse.Server.Volumes), "should have exactly one volume because we didn't pass volumes map in the requests.")
112
+
testhelpers.Assert(t, len(updateServerResponse.Server.Volumes)==1, "should have exactly one volume because we didn't pass volumes map in the requests.")
0 commit comments