chore: add a taskfile and default golangci-lint config
commitf6386bdbd38ef5689b3603200513a724d598eb52
authorAndrey Nering <andreynering@users.noreply.github.com>
dateWed 21 May 2025, 16:27 (1 year ago)
parenta83fec2
.golangci.ymlnew file+41
@@ -0,0 +1,41 @@
1+version: "2"
2+run:
3+ tests: false
4+linters:
5+ enable:
6+ - bodyclose
7+ - exhaustive
8+ - goconst
9+ - godot
10+ - godox
11+ - gomoddirectives
12+ - goprintffuncname
13+ - gosec
14+ - misspell
15+ - nakedret
16+ - nestif
17+ - nilerr
18+ - noctx
19+ - nolintlint
20+ - prealloc
21+ - revive
22+ - rowserrcheck
23+ - sqlclosecheck
24+ - tparallel
25+ - unconvert
26+ - unparam
27+ - whitespace
28+ - wrapcheck
29+ exclusions:
30+ generated: lax
31+ presets:
32+ - common-false-positives
33+issues:
34+ max-issues-per-linter: 0
35+ max-same-issues: 0
36+formatters:
37+ enable:
38+ - gofumpt
39+ - goimports
40+ exclusions:
41+ generated: lax
Taskfile.yamlnew file+19
@@ -0,0 +1,19 @@
1+# https://taskfile.dev
2+
3+version: "3"
4+
5+tasks:
6+ lint:
7+ desc: Run base linters
8+ cmds:
9+ - golangci-lint run
10+
11+ test:
12+ desc: Run tests
13+ cmds:
14+ - go test ./... {{.CLI_ARGS}}
15+
16+ fmt:
17+ desc: Run gofumpt
18+ cmds:
19+ - gofumpt -w .