Skip to content

Commit 8643fc2

Browse files
style: add .golangci-lint.yaml
1 parent 4432b74 commit 8643fc2

File tree

2 files changed

+30
-3
lines changed

2 files changed

+30
-3
lines changed

.golangci.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
linters:
2+
enable:
3+
- errorlint
4+
- forbidigo
5+
- gochecknoinits
6+
- gocritic
7+
- goconst
8+
- gocyclo
9+
- gofumpt
10+
- goimports
11+
- misspell
12+
- revive
13+
- unconvert
14+
- unparam
15+
- wastedassign
16+
17+
linters-settings:
18+
gocyclo:
19+
min-complexity: 12
20+
gofumpt:
21+
extra-rules: true
22+
govet:
23+
enable-all: true
24+
disable:
25+
- fieldalignment

pkg/analyzer/commit_analyzer.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ import (
77
"github.com/go-semantic-release/semantic-release/v2/pkg/semrel"
88
)
99

10-
var CAVERSION = "dev"
11-
var commitPattern = regexp.MustCompile(`^(\w*)(?:\((.*)\))?(\!)?\: (.*)$`)
12-
var breakingPattern = regexp.MustCompile("BREAKING CHANGES?")
10+
var (
11+
CAVERSION = "dev"
12+
commitPattern = regexp.MustCompile(`^(\w*)(?:\((.*)\))?(\!)?\: (.*)$`)
13+
breakingPattern = regexp.MustCompile("BREAKING CHANGES?")
14+
)
1315

1416
type DefaultCommitAnalyzer struct{}
1517

0 commit comments

Comments
 (0)