mirror of
https://github.com/mariadb-operator/mariadb-operator.git
synced 2025-08-15 21:02:38 +00:00
Ignore some staticchecks in golangci-lint
This commit is contained in:
@ -23,6 +23,14 @@ linters:
|
||||
locale: US
|
||||
nestif:
|
||||
min-complexity: 12
|
||||
staticcheck:
|
||||
# TODO: fix static check issues. Contributions are welcome!
|
||||
checks:
|
||||
- all
|
||||
- '-ST1001' # Dot imports are discouraged: https://staticcheck.dev/docs/checks/#ST1001
|
||||
- '-ST1003' # Poorly chosen identifier: https://staticcheck.dev/docs/checks/#ST1003
|
||||
- '-ST1005' # Incorrectly formatted error string: https://staticcheck.dev/docs/checks/#ST1005
|
||||
- '-QF1008' # Omit embedded fields from selector expression: https://staticcheck.dev/docs/checks/#QF1008
|
||||
exclusions:
|
||||
generated: lax
|
||||
presets:
|
||||
|
@ -324,7 +324,7 @@ func Connect(dsn string) (*sql.DB, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := db.Ping(); err != nil {
|
||||
if err := db.PingContext(context.Background()); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return db, nil
|
||||
|
Reference in New Issue
Block a user