Skip to content

Commit

Permalink
style: add .golangci-lint.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
christophwitzko committed Jan 13, 2023

Verified

This commit was signed with the committer’s verified signature.
renovate-bot Mend Renovate
1 parent 4432b74 commit 8643fc2
Showing 2 changed files with 30 additions and 3 deletions.
25 changes: 25 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
linters:
enable:
- errorlint
- forbidigo
- gochecknoinits
- gocritic
- goconst
- gocyclo
- gofumpt
- goimports
- misspell
- revive
- unconvert
- unparam
- wastedassign

linters-settings:
gocyclo:
min-complexity: 12
gofumpt:
extra-rules: true
govet:
enable-all: true
disable:
- fieldalignment
8 changes: 5 additions & 3 deletions pkg/analyzer/commit_analyzer.go
Original file line number Diff line number Diff line change
@@ -7,9 +7,11 @@ import (
"github.com/go-semantic-release/semantic-release/v2/pkg/semrel"
)

var CAVERSION = "dev"
var commitPattern = regexp.MustCompile(`^(\w*)(?:\((.*)\))?(\!)?\: (.*)$`)
var breakingPattern = regexp.MustCompile("BREAKING CHANGES?")
var (
CAVERSION = "dev"
commitPattern = regexp.MustCompile(`^(\w*)(?:\((.*)\))?(\!)?\: (.*)$`)
breakingPattern = regexp.MustCompile("BREAKING CHANGES?")
)

type DefaultCommitAnalyzer struct{}

0 comments on commit 8643fc2

Please sign in to comment.