Skip to content

Commit ebec1bc

Browse files
committed
ci: migrate to wsl_v5 linter
1 parent 7fb6603 commit ebec1bc

File tree

5 files changed

+3
-5
lines changed

5 files changed

+3
-5
lines changed

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ linters:
7474
- unused
7575
- usestdlibvars
7676
- whitespace
77-
- wsl
77+
- wsl_v5
7878
- zerologlint
7979
settings:
8080
tagliatelle:

app/app.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ func (g GitSV) LastTag() string {
132132

133133
return nil
134134
})
135-
136135
if err != nil || len(tags) == 0 {
137136
return ""
138137
}

app/commands/validatecommitmessage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ func ValidateCommitMessageFlags() []cli.Flag {
4141
func ValidateCommitMessageHandler(g app.GitSV) cli.ActionFunc {
4242
return func(_ context.Context, c *cli.Command) error {
4343
branch := g.Branch()
44-
detached, derr := g.IsDetached()
4544

45+
detached, derr := g.IsDetached()
4646
if g.MessageProcessor.SkipBranch(branch, derr == nil && detached) {
4747
log.Warn().Msg("commit message validation skipped, branch in ignore list or detached...")
4848

cmd/git-sv/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ When flag range is "date", if "end" is YYYY-MM-DD the range will be inclusive.`,
136136
},
137137
},
138138
}
139-
140139
if err := app.Run(context.Background(), os.Args); err != nil {
141140
log.Fatal().Err(err).Msg("Execution error")
142141
}

sv/message.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ func (p BaseMessageProcessor) SkipBranch(branch string, detached bool) bool {
143143
// Validate commit message.
144144
func (p BaseMessageProcessor) Validate(message string) error {
145145
subject, body := splitCommitMessageContent(message)
146-
msg, parseErr := p.Parse(subject, body)
147146

147+
msg, parseErr := p.Parse(subject, body)
148148
if parseErr != nil {
149149
return parseErr
150150
}

0 commit comments

Comments
 (0)