Tune .golangci.yml and fix small lint

Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
This commit is contained in:
Christian Mesh
2025-05-09 14:00:50 -04:00
parent c84716d37b
commit ae542df787
2 changed files with 8 additions and 9 deletions

View File

@@ -5,6 +5,11 @@
version: "2"
linters:
settings:
staticcheck:
# For now, we will disable some static checks to match golang-ci-lint@v1 functionality.
# These should be addressed once the --new-from-rev work is taken care of.
checks: ["all", "-QF1008", "-ST1003", "-ST1005", "-ST1012", "-ST1016"]
exclusions:
generated: lax
presets:
@@ -20,13 +25,7 @@ linters:
- ^internal/ipaddr/
- ^internal/legacy/
- ^internal/states/statefile/version\d+_upgrade\.go$
- third_party$
- builtin$
- examples$
- ^website/
formatters:
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$

View File

@@ -9,11 +9,11 @@ import (
"crypto/md5"
"database/sql"
"fmt"
"github.com/lib/pq"
"hash/fnv"
"github.com/lib/pq"
uuid "github.com/hashicorp/go-uuid"
_ "github.com/lib/pq"
"github.com/opentofu/opentofu/internal/states/remote"
"github.com/opentofu/opentofu/internal/states/statemgr"
)