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
# STxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
22
-
# Default: ["*"]
23
-
checks: ["all", "-ST1000", "-ST1003"]
24
-
1
+
version: "2"
2
+
run:
3
+
go: "1.22"
4
+
# issues:
5
+
# fix: true
25
6
linters:
26
7
enable:
27
8
- asasalint # Check for pass []any as any in variadic func(...any)
28
9
- asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
29
10
- bidichk # Checks for dangerous unicode character sequences
30
11
- bodyclose # Checks whether HTTP response body is closed successfully
31
-
- copyloopvar # Detects places where loop variables are copied
12
+
#- copyloopvar # Detects places where loop variables are copied
32
13
- decorder # Check declaration order and count of types, constants, variables and functions
33
14
- dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
34
15
- dupl # Tool for code clone detection
@@ -38,25 +19,20 @@ linters:
38
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.
39
20
- errname # Checks that sentinel errors are prefixed with the `Err` and error types are suffixed with the `Error`.
40
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.
22
+
# - exportloopref # checks for pointers to enclosing loop variables
41
23
- forcetypeassert # finds forced type assertions
42
-
- gci # Gci control golang package import order and make it always deterministic.
43
24
- gocheckcompilerdirectives # Checks that go compiler directive comments (//go:) are valid.
44
25
- gocognit # Computes and checks the cognitive complexity of functions
45
26
- goconst # Finds repeated strings that could be replaced by a constant
46
27
- gocritic # The most opinionated Go source code linter
47
28
- gocyclo # Computes and checks the cyclomatic complexity of functions
48
-
# - godox # Tool for detection of FIXME, TODO and other comment keywords
49
29
# - goerr113 # Golang linter to check the errors handling expressions
50
-
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
51
-
- gofumpt # Gofumpt checks whether code was gofumpt-ed.
52
30
- goheader # Checks is file header matches to pattern
53
-
- goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
54
-
- gomoddirectives # Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod.
31
+
# - gomoddirectives # Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod.
55
32
- 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.
56
33
- goprintffuncname # Checks that printf-like functions are named with `f` at the end
57
34
- gosec # Inspects source code for security problems
58
35
- gosmopolitan # Report certain i18n/l10n anti-patterns in your Go codebase
59
-
- gosimple # Linter for Go source code that specializes in simplifying a code
60
36
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
61
37
- grouper # An analyzer to analyze expression groups
62
38
- importas # Enforces consistent import aliases
@@ -81,11 +57,8 @@ linters:
81
57
- sloglint # Ensure consistent code style when using log/slog
82
58
- spancheck # Checks for mistakes with OpenTelemetry/Census spans
83
59
- staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
84
-
- stylecheck # Stylecheck is a replacement for golint
85
-
- tenv # tenv is analyzer that detects using os.Setenv instead of t.Setenv since Go1.17
86
60
- testifylint # Checks usage of github.com/stretchr/testify.
87
61
- tparallel # tparallel detects inappropriate usage of t.Parallel() method in your Go test codes
88
-
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
89
62
- unconvert # Remove unnecessary type conversions
90
63
- unparam # Reports unused function parameters
91
64
- unused # Checks Go code for unused constants, variables, functions and types
@@ -104,7 +77,7 @@ linters:
104
77
- gochecknoglobals # Checks that no globals are present in Go code
105
78
- gochecknoinits # Checks that no init functions are present in Go code
106
79
- godot # Check if comments end in a period
107
-
- gomnd#An analyzer to detect magic numbers.
80
+
- godox#Tool for detection of FIXME, TODO and other comment keywords
108
81
- inamedparam # Reports interfaces with unnamed method parameters.
109
82
- interfacebloat # A linter that checks the number of methods inside an interface
0 commit comments