Skip to content

Commit 74b7c6f

Browse files
deps: update pre-commit hook golangci/golangci-lint (#1151)
1 parent f0be3cd commit 74b7c6f

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ build:
2525

2626
test:lint:
2727
stage: test
28-
image: golangci/golangci-lint:v2.8
28+
image: golangci/golangci-lint:v2.10
2929
variables:
3030
GOLANGCI_LINT_CACHE: $CI_PROJECT_DIR/.cache/golangci-lint
3131
cache:

.golangci.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ linters:
7474
alias: hrobotmodels
7575
no-unaliased: true
7676

77+
revive:
78+
rules:
79+
- name: var-naming
80+
arguments: [[], [], [{ skipPackageNameCollisionWithGoStd: true }]]
81+
7782
exclusions:
7883
generated: lax
7984
presets:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ repos:
8282
- id: shellcheck
8383

8484
- repo: https://github.com/golangci/golangci-lint
85-
rev: v2.8.0
85+
rev: v2.10.1
8686
hooks:
8787
- id: golangci-lint-full
8888
language_version: 1.25.7 # renovate: datasource=golang-version depName=go

internal/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ type HCloudClientConfiguration struct {
4747
type RobotConfiguration struct {
4848
Enabled bool
4949
User string
50-
Password string
50+
Password string // #nosec G117 -- This config is never json marshaled
5151
CacheTimeout time.Duration
5252
RateLimitWaitTime time.Duration
5353
// ForwardInternalIPs is enabled by default.

tools/doc_generation.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,19 +145,19 @@ func (t *ConstantDocTable) String(hasReadOnlyColumn bool) string {
145145
defaultVal = t.entries[constValue].Default
146146
}
147147

148-
tableStr.WriteString(fmt.Sprintf("| `%s` ", constValue))
149-
tableStr.WriteString(fmt.Sprintf("| `%s` ", typeVal))
150-
tableStr.WriteString(fmt.Sprintf("| `%s` ", defaultVal))
148+
fmt.Fprintf(&tableStr, "| `%s` ", constValue)
149+
fmt.Fprintf(&tableStr, "| `%s` ", typeVal)
150+
fmt.Fprintf(&tableStr, "| `%s` ", defaultVal)
151151

152152
if hasReadOnlyColumn {
153153
readOnlyVal := "No"
154154
if t.entries[constValue].ReadOnly {
155155
readOnlyVal = "Yes"
156156
}
157-
tableStr.WriteString(fmt.Sprintf("| `%s` ", readOnlyVal))
157+
fmt.Fprintf(&tableStr, "| `%s` ", readOnlyVal)
158158
}
159159

160-
tableStr.WriteString(fmt.Sprintf("| %s |\n", t.entries[constValue].Description))
160+
fmt.Fprintf(&tableStr, "| %s |\n", t.entries[constValue].Description)
161161
}
162162

163163
return tableStr.String()

0 commit comments

Comments
 (0)