Skip to content

Commit b140aba

Browse files
committed
OPTIM/MINOR: bump betteralign and gofumpt versions
Update betteralign (v0.9.0 to v0.12.0) and gofumpt (v0.9.2 to v0.10.0) in taskfile.yml to keep development tools up to date. Consequently, apply the formatting rules enforced by the updated gofumpt version to check.go and match/golang.go. This introduces trailing commas for multi-line function calls and adjusts line breaks to comply with the latest style guidelines.
1 parent 82db1b5 commit b140aba

3 files changed

Lines changed: 14 additions & 8 deletions

File tree

check.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,27 +102,32 @@ func checkSubjectText(subject string, junitSuite junit.Interface) error {
102102
junitSuite.AddMessageFailed(ErrSubjectMessageFormat.Error(), "malformatted subject string (trailing or double spaces?)", fmt.Sprintf("subject: %s", subject))
103103
return fmt.Errorf(
104104
"malformatted subject string (trailing or double spaces?): '%s' (%w)",
105-
subject, ErrSubjectMessageFormat)
105+
subject, ErrSubjectMessageFormat,
106+
)
106107
}
107108

108109
if subjectPartsLen < MINSUBJECTPARTS || subjectPartsLen > MAXSUBJECTPARTS {
109110
junitSuite.AddMessageFailed(
110111
ErrSubjectMessageFormat.Error(),
111112
fmt.Sprintf("subject word count out of bounds [words %d < %d < %d]", MINSUBJECTPARTS, subjectPartsLen, MAXSUBJECTPARTS),
112-
fmt.Sprintf("subject: %s", subject))
113+
fmt.Sprintf("subject: %s", subject),
114+
)
113115
return fmt.Errorf(
114116
"subject word count out of bounds [words %d < %d < %d] '%s': %w",
115-
MINSUBJECTPARTS, subjectPartsLen, MAXSUBJECTPARTS, subjectParts, ErrSubjectMessageFormat)
117+
MINSUBJECTPARTS, subjectPartsLen, MAXSUBJECTPARTS, subjectParts, ErrSubjectMessageFormat,
118+
)
116119
}
117120

118121
if subjectLen < MINSUBJECTLEN || subjectLen > MAXSUBJECTLEN {
119122
junitSuite.AddMessageFailed(
120123
ErrSubjectMessageFormat.Error(),
121124
fmt.Sprintf("subject length out of bounds [len %d < %d < %d]", MINSUBJECTLEN, subjectLen, MAXSUBJECTLEN),
122-
fmt.Sprintf("subject: %s", subject))
125+
fmt.Sprintf("subject: %s", subject),
126+
)
123127
return fmt.Errorf(
124128
"subject length out of bounds [len %d < %d < %d] '%s': %w",
125-
MINSUBJECTLEN, subjectLen, MAXSUBJECTLEN, subject, ErrSubjectMessageFormat)
129+
MINSUBJECTLEN, subjectLen, MAXSUBJECTLEN, subject, ErrSubjectMessageFormat,
130+
)
126131
}
127132

128133
return nil

match/golang.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ func GetImportWordsFromGoFile(filename string) []string {
2828
fileContent := string(data)
2929

3030
var importWords []string
31-
importWords = append(importWords,
31+
importWords = append(
32+
importWords,
3233
"break", "default", "func", "interface", "select",
3334
"case", "defer", "go", "map", "struct",
3435
"chan", "else", "goto", "package", "switch",

taskfile.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
version: "3"
33

44
vars:
5-
BETTERALIGN: github.com/dkorunic/betteralign/cmd/betteralign@v0.9.0
5+
BETTERALIGN: github.com/dkorunic/betteralign/cmd/betteralign@v0.12.0
66
STATICCHECK: honnef.co/go/tools/cmd/staticcheck@v0.7.0
77
GOVULNCHECK: golang.org/x/vuln/cmd/govulncheck@v1.1.4
8-
GOFUMPT: mvdan.cc/gofumpt@v0.9.2
8+
GOFUMPT: mvdan.cc/gofumpt@v0.10.0
99
REVIVE: github.com/mgechev/revive@v1.15.0
1010
GOTESTSUM: gotest.tools/gotestsum@v1.13.0
1111

0 commit comments

Comments
 (0)