Skip to content

Commit

Permalink
Update to golang-ci 1.58
Browse files Browse the repository at this point in the history
  • Loading branch information
MaXal committed May 6, 2024
1 parent 9df22af commit 0bfc59d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
21 changes: 4 additions & 17 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,6 @@ linters-settings:
# Default: true
skipRecvDeref: false

gomnd:
# List of function patterns to exclude from analysis.
# Values always ignored: `time.Date`,
# `strconv.FormatInt`, `strconv.FormatUint`, `strconv.FormatFloat`,
# `strconv.ParseInt`, `strconv.ParseUint`, `strconv.ParseFloat`.
# Default: []
ignored-functions:
- os.Chmod
- os.Mkdir
- os.MkdirAll
- os.OpenFile
- os.WriteFile
- prometheus.ExponentialBuckets
- prometheus.ExponentialBucketsRange
- prometheus.LinearBuckets


gomodguard:
Expand Down Expand Up @@ -124,7 +109,6 @@ linters:
- durationcheck # checks for two durations multiplied together
- errname # checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error
- errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13
- execinquery # checks query string in Query function which reads your Go src files and warning it finds
- exportloopref # checks for pointers to enclosing loop variables
- gocheckcompilerdirectives # validates go compiler directive comments (//go:)
- gocritic # provides diagnostics that check for bugs, performance and style issues
Expand Down Expand Up @@ -155,6 +139,7 @@ linters:
- usestdlibvars # detects the possibility to use variables/constants from the Go standard library
- copyloopvar # checks for copying loop variables by reference
- intrange # checks for integer ranges that can be simplified
- err113 # checks for errors that are unchecked and can be returned

issues:
# Maximum count of issues with the same text.
Expand All @@ -180,4 +165,6 @@ issues:
- text: 'exitAfterDefer:'
linters: [ gocritic ]
- text: "SA1019: \"github.com/golang/protobuf/proto\" is deprecated"
linters: [ staticcheck ]
linters: [ staticcheck ]
- text: "do not define dynamic errors"
linters: [ err113 ]
2 changes: 1 addition & 1 deletion cmd/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
func main() {
err := server.Serve(env.Get("CLICKHOUSE", server.DefaultDbUrl), env.Get("NATS", ""))
if err != nil {
slog.Error("error", err)
slog.Error("error on starting backend", "error", err)
os.Exit(1)
}
}

0 comments on commit 0bfc59d

Please sign in to comment.