Bump golangci-linter to 1.62.2 (#772)

* Bump golangci-linter to 1.62.2
* Address linting warning via change or ignore
This commit is contained in:
Dan Sosedoff
2025-11-11 11:26:49 -08:00
committed by GitHub
parent 70f62feec8
commit 4ce11c039e
4 changed files with 7 additions and 5 deletions

View File

@@ -97,7 +97,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.57.1
version: v1.62.2
fmt:
name: fmt

View File

@@ -57,7 +57,9 @@ func assertMatches(t *testing.T, expected, src []string) {
func pgVersion() (int, int) {
var major, minor int
fmt.Sscanf(os.Getenv("PGVERSION"), "%d.%d", &major, &minor)
if _, err := fmt.Sscanf(os.Getenv("PGVERSION"), "%d.%d", &major, &minor); err != nil {
log.Println("[warn] unable to read value of PGVERSION env var")
}
return major, minor
}

View File

@@ -28,9 +28,9 @@ var (
// Example: 10.2.3.1 -> 10.2
func getMajorMinorVersion(str string) (major int, minor int) {
chunks := strings.Split(str, ".")
fmt.Sscanf(chunks[0], "%d", &major)
fmt.Sscanf(chunks[0], "%d", &major) //nolint
if len(chunks) > 1 {
fmt.Sscanf(chunks[1], "%d", &minor)
fmt.Sscanf(chunks[1], "%d", &minor) //nolint
}
return
}

View File

@@ -178,7 +178,7 @@ func lookupPassword(opts command.Options, url *neturl.URL) string {
if url != nil {
var dbName string
fmt.Sscanf(url.Path, "/%s", &dbName)
fmt.Sscanf(url.Path, "/%s", &dbName) //nolint
return passfile.FindPassword(
url.Hostname(),