Skip to content

Commit fb51a7c

Browse files
committed
ci: configure CI/CD and linting for Go project
- Add `.golangci.yml` configuration file with specific linters enabled and a 3-minute timeout for the run - Add `.goreleaser.yaml` configuration file with build skipping and changelog grouping based on commit message patterns Signed-off-by: appleboy <[email protected]>
1 parent 9108f52 commit fb51a7c

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed

.golangci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
linters:
2+
enable-all: false
3+
disable-all: true
4+
fast: false
5+
enable:
6+
- bodyclose
7+
- dogsled
8+
- dupl
9+
- errcheck
10+
- exportloopref
11+
- exhaustive
12+
- gochecknoinits
13+
- goconst
14+
- gocritic
15+
- gocyclo
16+
- gofmt
17+
- goimports
18+
- goprintffuncname
19+
- gosec
20+
- gosimple
21+
- govet
22+
- ineffassign
23+
- lll
24+
- misspell
25+
- nakedret
26+
- noctx
27+
- nolintlint
28+
- rowserrcheck
29+
- staticcheck
30+
- stylecheck
31+
- typecheck
32+
- unconvert
33+
- unparam
34+
- unused
35+
- whitespace
36+
- gofumpt
37+
38+
run:
39+
timeout: 3m

.goreleaser.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
builds:
2+
- # If true, skip the build.
3+
# Useful for library projects.
4+
# Default is false
5+
skip: true
6+
7+
changelog:
8+
use: github
9+
groups:
10+
- title: Features
11+
regexp: "^.*feat[(\\w)]*:+.*$"
12+
order: 0
13+
- title: "Bug fixes"
14+
regexp: "^.*fix[(\\w)]*:+.*$"
15+
order: 1
16+
- title: "Enhancements"
17+
regexp: "^.*chore[(\\w)]*:+.*$"
18+
order: 2
19+
- title: "Refactor"
20+
regexp: "^.*refactor[(\\w)]*:+.*$"
21+
order: 3
22+
- title: "Build process updates"
23+
regexp: ^.*?(build|ci)(\(.+\))??!?:.+$
24+
order: 4
25+
- title: "Documentation updates"
26+
regexp: ^.*?docs?(\(.+\))??!?:.+$
27+
order: 4
28+
- title: Others

0 commit comments

Comments
 (0)