-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into mschfh-pprof
- Loading branch information
Showing
11 changed files
with
102 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
run: | ||
go: "1.22" | ||
timeout: 3m | ||
|
||
linters-settings: | ||
cyclop: | ||
# The maximal code complexity to report. | ||
# Default: 10 | ||
max-complexity: 10 | ||
# The maximal average package complexity. | ||
# If it's higher than 0.0 (float) the check is enabled | ||
# Default: 0.0 | ||
package-average: 10.0 | ||
|
||
errcheck: | ||
# Report about not checking of errors in type assertions: `a := b.(MyStruct)`. | ||
# Such cases aren't reported by default. | ||
# Default: false | ||
check-type-assertions: true | ||
|
||
gocritic: | ||
# Settings passed to gocritic. | ||
# The settings key is the name of a supported gocritic checker. | ||
# The list of supported checkers can be find in https://go-critic.github.io/overview. | ||
settings: | ||
captLocal: | ||
# Whether to restrict checker to params only. | ||
# Default: true | ||
paramsOnly: false | ||
underef: | ||
# Whether to skip (*x).method() calls where x is a pointer receiver. | ||
# Default: true | ||
skipRecvDeref: false | ||
|
||
govet: | ||
enable: | ||
- shadow | ||
|
||
varcheck: | ||
# Check usage of exported fields and variables. | ||
# Default: false | ||
exported-fields: true | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
## enabled by default | ||
- unused # Finds unused code | ||
- gofmt | ||
# - 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 a 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 # Staticcheck is a go vet on steroids, applying a ton of static analysis checks | ||
# - structcheck # Finds unused struct fields | ||
- 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 | ||
# - varcheck # Finds unused global variables and constants | ||
# ## disabled by default | ||
# - contextcheck # check the function whether use a non-inherited context | ||
# - cyclop # checks function and package cyclomatic complexity | ||
# - errname # Checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error. | ||
# - gocritic # Provides diagnostics that check for bugs, performance and style issues. | ||
# - gocyclo # Computes and checks the cyclomatic complexity of functions | ||
# - nestif # Reports deeply nested if statements | ||
- revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint. | ||
# - sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed | ||
# - stylecheck # Stylecheck is a replacement for golint | ||
# - wastedassign # wastedassign finds wasted assignment statements. | ||
# - whitespace # Tool for detection of leading and trailing whitespace | ||
|
||
issues: | ||
exclude-rules: | ||
- text: 'shadow: declaration of "(err|ctx)" shadows declaration at' | ||
linters: [govet] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters