Skip to content

Commit 57705ba

Browse files
committed
chore: Update tools
1 parent 2de0cb7 commit 57705ba

24 files changed

+67
-38
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ env:
1717
AGE_VERSION: 1.2.1 # https://github.com/FiloSottile/age/releases
1818
CHOCOLATEY_VERSION: 2.5.1 # https://github.com/chocolatey/choco/releases
1919
GO_VERSION: 1.25.1 # https://go.dev/doc/devel/release
20-
GOLANGCI_LINT_VERSION: 2.4.0 # https://github.com/golangci/golangci-lint/releases
21-
GORELEASER_VERSION: 2.12.1 # https://github.com/goreleaser/goreleaser/releases
20+
GOLANGCI_LINT_VERSION: 2.5.0 # https://github.com/golangci/golangci-lint/releases
21+
GORELEASER_VERSION: 2.12.2 # https://github.com/goreleaser/goreleaser/releases
2222
PYTHON_VERSION: '3.10' # https://www.python.org/downloads/
2323
RAGE_VERSION: 0.11.1 # https://github.com/str4d/rage/releases
24-
UV_VERSION: 0.8.17 # https://github.com/astral-sh/uv/releases
24+
UV_VERSION: 0.8.21 # https://github.com/astral-sh/uv/releases
2525
jobs:
2626
changes:
2727
runs-on: ubuntu-22.04

.golangci.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: '2'
22
run:
3-
go: '1.24'
3+
go: '1.25'
44
linters:
55
enable:
66
- asciicheck
@@ -26,6 +26,7 @@ linters:
2626
- gocheckcompilerdirectives
2727
- gochecksumtype
2828
- gocritic
29+
- godoclint
2930
- godot
3031
- gomodguard
3132
- goprintffuncname
@@ -36,6 +37,7 @@ linters:
3637
- inamedparam
3738
- interfacebloat
3839
- intrange
40+
- iotamixing
3941
- loggercheck
4042
- makezero
4143
- mirror
@@ -61,6 +63,7 @@ linters:
6163
- thelper
6264
- unconvert
6365
- unparam
66+
- unqueryvet
6467
- usestdlibvars
6568
- usetesting
6669
- wastedassign
@@ -121,6 +124,10 @@ linters:
121124
- rangeValCopy
122125
- unnamedResult
123126
- whyNoLint
127+
godoclint:
128+
default: all
129+
disable:
130+
- require-doc
124131
govet:
125132
disable:
126133
- fieldalignment
@@ -154,6 +161,8 @@ linters:
154161
disabled: true
155162
- name: import-shadowing
156163
disabled: true
164+
- name: identical-switch-branches
165+
disabled: true
157166
- name: line-length-limit
158167
disabled: true
159168
- name: max-control-nesting
@@ -162,10 +171,14 @@ linters:
162171
disabled: true
163172
- name: nested-structs
164173
disabled: true
174+
- name: unhandled-error
175+
disabled: true
165176
- name: unused-parameter
166177
disabled: true
167178
- name: unused-receiver
168179
disabled: true
180+
- name: useless-fallthrough
181+
disabled: true
169182
staticcheck:
170183
checks:
171184
- all
@@ -178,6 +191,9 @@ linters:
178191
- legacy
179192
- std-error-handling
180193
rules:
194+
- linters:
195+
- godoclint
196+
path: internal/chezmoi/chezmoi_windows.go # https://github.com/godoc-lint/godoc-lint/issues/56
181197
- linters:
182198
- err113
183199
text: do not define dynamic errors, use wrapped static errors instead

internal/chezmoi/abspath.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,9 @@ func HomeDirAbsPath() (AbsPath, error) {
160160
return absPath, nil
161161
}
162162

163-
// StringToAbsPathHookFunc is a github.com/go-viper/mapstructure/v2.DecodeHookFunc
164-
// that parses an AbsPath from a string.
163+
// StringToAbsPathHookFunc is a
164+
// github.com/go-viper/mapstructure/v2.DecodeHookFunc that parses an AbsPath
165+
// from a string.
165166
func StringToAbsPathHookFunc() mapstructure.DecodeHookFunc {
166167
return func(from, to reflect.Type, data any) (any, error) {
167168
if to != reflect.TypeOf(EmptyAbsPath) {

internal/chezmoi/chezmoi_windows.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ func findExecutableExtensions(path string) []string {
2828
return result
2929
}
3030

31-
// IsExecutable checks if the file is a regular file and has an extension listed
32-
// in the PATHEXT environment variable as per
31+
// IsExecutable checks if the file is a regular file and has an
32+
// extension listed in the PATHEXT environment variable as per
3333
// https://www.nextofwindows.com/what-is-pathext-environment-variable-in-windows.
3434
func IsExecutable(fileInfo fs.FileInfo) bool {
3535
if fileInfo.Mode().Perm()&0o111 != 0 {

internal/chezmoi/debugsystem.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ type DebugSystem struct {
1717
system System
1818
}
1919

20-
// NewDebugSystem returns a new DebugSystem that logs methods on system to logger.
20+
// NewDebugSystem returns a new DebugSystem that logs methods on system to
21+
// logger.
2122
func NewDebugSystem(system System, logger *slog.Logger) *DebugSystem {
2223
return &DebugSystem{
2324
logger: logger,

internal/chezmoi/entrytypeset.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ func (s *EntryTypeSet) Type() string {
343343
}
344344

345345
// StringSliceToEntryTypeSetHookFunc is a
346-
// github.com/go-viper/mapstructure/v2.DecodeHookFunc that parses an EntryTypeSet
347-
// from a []string.
346+
// github.com/go-viper/mapstructure/v2.DecodeHookFunc that parses an
347+
// EntryTypeSet from a []string.
348348
func StringSliceToEntryTypeSetHookFunc() mapstructure.DecodeHookFunc {
349349
return func(from, to reflect.Type, data any) (any, error) {
350350
if to != reflect.TypeOf(EntryTypeSet{}) {

internal/chezmoi/gpgencryption.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import (
1010
"chezmoi.io/chezmoi/internal/chezmoilog"
1111
)
1212

13-
// A GPGEncryption uses gpg for encryption and decryption. See https://gnupg.org/.
13+
// A GPGEncryption uses gpg for encryption and decryption. See
14+
// https://gnupg.org/.
1415
type GPGEncryption struct {
1516
Command string `json:"command" mapstructure:"command" yaml:"command"`
1617
Args []string `json:"args" mapstructure:"args" yaml:"args"`

internal/chezmoi/hexbytes.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ func (h *HexBytes) UnmarshalText(text []byte) error {
4646
return nil
4747
}
4848

49-
// UnmarshalYAML implements github.com/goccy/go-yaml.BytesUnmarshaler.UnmarshalYAML.
49+
// UnmarshalYAML implements
50+
// github.com/goccy/go-yaml.BytesUnmarshaler.UnmarshalYAML.
5051
func (h *HexBytes) UnmarshalYAML(data []byte) error {
5152
s, err := strconv.Unquote(string(data))
5253
if err != nil {

internal/chezmoi/persistentstate.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ func PersistentStateData(s PersistentState, buckets map[string][]byte) (map[stri
5959
return result, nil
6060
}
6161

62-
// PersistentStateGet gets the value associated with key in bucket in s, if it exists.
62+
// PersistentStateGet gets the value associated with key in bucket in s, if it
63+
// exists.
6364
func PersistentStateGet(s PersistentState, bucket, key []byte, value any) (bool, error) {
6465
data, err := s.Get(bucket, key)
6566
if err != nil {

internal/chezmoi/realsystem_unix.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ func RealSystemWithSafe(safe bool) RealSystemOption {
3232
}
3333
}
3434

35-
// RealSystemWithScriptTempDir sets the script temporary directory of the RealSystem.
35+
// RealSystemWithScriptTempDir sets the script temporary directory of the
36+
// RealSystem.
3637
func RealSystemWithScriptTempDir(scriptTempDir AbsPath) RealSystemOption {
3738
return func(s *RealSystem) {
3839
s.scriptTempDir = scriptTempDir

0 commit comments

Comments
 (0)