Skip to content

Commit 3516cc4

Browse files
committed
Update golangci-lint to 1.62.0
This makes it easy to run `make lint` locally, avoiding noise in the CI and expensive rebuilds. This change reveal an issue that was not reported by the older version. Change the code to avoid this issue. Signed-off-by: Nir Soffer <[email protected]>
1 parent af4e870 commit 3516cc4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Run golangci-lint
4242
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
4343
with:
44-
version: v1.60.1
44+
version: v1.62.0
4545
args: --verbose --timeout=10m
4646
- name: Run yamllint
4747
run: yamllint .

cmd/limactl/gendoc.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ weight: 3
116116
})
117117
}
118118

119-
// replaceAll replaces all occurrences of new with old, for all files in dir.
120-
func replaceAll(dir, old, new string) error {
121-
logrus.Infof("Replacing %q with %q", old, new)
119+
// replaceAll replaces all occurrences of text with replacement, for all files in dir.
120+
func replaceAll(dir, text, replacement string) error {
121+
logrus.Infof("Replacing %q with %q", text, replacement)
122122
return filepath.Walk(dir, func(path string, info fs.FileInfo, err error) error {
123123
if err != nil {
124124
return err
@@ -133,7 +133,7 @@ func replaceAll(dir, old, new string) error {
133133
if err != nil {
134134
return err
135135
}
136-
out := bytes.ReplaceAll(in, []byte(old), []byte(new))
136+
out := bytes.ReplaceAll(in, []byte(text), []byte(replacement))
137137
err = os.WriteFile(path, out, 0o644)
138138
if err != nil {
139139
return err

0 commit comments

Comments
 (0)