From 8643fc216901a5b88e4e8097f33a49b389e280f1 Mon Sep 17 00:00:00 2001
From: Christoph Witzko <github@christophwitzko.com>
Date: Fri, 13 Jan 2023 13:47:16 +0100
Subject: [PATCH] style: add .golangci-lint.yaml

---
 .golangci.yaml                  | 25 +++++++++++++++++++++++++
 pkg/analyzer/commit_analyzer.go |  8 +++++---
 2 files changed, 30 insertions(+), 3 deletions(-)
 create mode 100644 .golangci.yaml

diff --git a/.golangci.yaml b/.golangci.yaml
new file mode 100644
index 0000000..f5c0478
--- /dev/null
+++ b/.golangci.yaml
@@ -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
diff --git a/pkg/analyzer/commit_analyzer.go b/pkg/analyzer/commit_analyzer.go
index cfc725e..7b1ac64 100644
--- a/pkg/analyzer/commit_analyzer.go
+++ b/pkg/analyzer/commit_analyzer.go
@@ -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{}
 
-- 
GitLab