Fix lint errors and bump golangci-lint to v2/action v9
CI / Test (linux/amd64) (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Cross-build (darwin/amd64) (push) Waiting to run
CI / Cross-build (linux/amd64) (push) Waiting to run
CI / Cross-build (darwin/arm64) (push) Waiting to run
CI / Cross-build (linux/arm64) (push) Waiting to run

- Migrate .golangci.yml to golangci-lint v2 config format
- Bump golangci-lint-action from v6 (Node 20, deprecated) to v9 (Node 24)
- Fix errcheck: check fmt.Fscanln and fmt.Sscanf return values
- Fix ineffassign: replace unused vars with _ in test files
- Fix revive unused-parameter: rename unused cmd/args/r/c params to _
- Fix revive empty-block: invert if condition in push command
- Fix revive redefines-builtin-id: rename 'clear' to 'clearsigned'
- Fix revive blank-imports: add comment on modernc.org/sqlite import
- Fix unused: remove unused 'suite' and 'gen' fields from cache entry
This commit is contained in:
2026-06-28 17:07:50 -05:00
parent f7ccf67b8a
commit c5e64cf63f
19 changed files with 84 additions and 71 deletions
+4 -4
View File
@@ -190,13 +190,13 @@ func (c *Config) Validate() error {
return nil
}
func set(c *Config, env string, dst *string) {
func set(_ *Config, env string, dst *string) {
if v, ok := os.LookupEnv(env); ok && v != "" {
*dst = v
}
}
func setInt(c *Config, env string, dst *int) {
func setInt(_ *Config, env string, dst *int) {
if v, ok := os.LookupEnv(env); ok && v != "" {
if n, err := strconv.Atoi(v); err == nil {
*dst = n
@@ -204,7 +204,7 @@ func setInt(c *Config, env string, dst *int) {
}
}
func setInt64(c *Config, env string, dst *int64) {
func setInt64(_ *Config, env string, dst *int64) {
if v, ok := os.LookupEnv(env); ok && v != "" {
if n, err := strconv.ParseInt(v, 10, 64); err == nil {
*dst = n
@@ -212,7 +212,7 @@ func setInt64(c *Config, env string, dst *int64) {
}
}
func setBool(c *Config, env string, dst *bool) {
func setBool(_ *Config, env string, dst *bool) {
if v, ok := os.LookupEnv(env); ok && v != "" {
if b, err := strconv.ParseBool(v); err == nil {
*dst = b