Skip to content

Commit 535dc92

Browse files
committed
chore: update template files
1 parent 61630c3 commit 535dc92

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,6 @@ experimenting
4848

4949
## CI assets
5050
.templates
51+
52+
## Taskfile
53+
.task

.golangci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ linters:
5353
- inamedparam # reports interfaces with unnamed method parameters
5454
- interfacebloat # check for large interfaces
5555
- intrange # find places where for loops could make use of an integer range
56-
- ireturn # Accept Interfaces, Return Concrete Types.
5756
- lll # check for long lines
5857
- maintidx # measures the maintainability index of each function
5958
- mirror # reports wrong mirror patterns of bytes/strings usage
@@ -123,6 +122,7 @@ linters:
123122
- mnd # too many detections
124123
- cyclop # covered by gocyclo
125124
- gochecknoglobals # there are many valid reasons for global variables, depending on the project
125+
- ireturn # there are too many exceptions
126126

127127
linters-settings:
128128
wsl:
@@ -139,6 +139,9 @@ linters-settings:
139139
line-length: 140
140140
tab-width: 1
141141

142+
nlreturn:
143+
block-size: 2
144+
142145
exhaustive:
143146
check-generated: false
144147
default-signifies-exhaustive: true

Taskfile.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# ┌───────────────────────────────────────────────────────────────────┐
2+
# │ │
3+
# │ IMPORTANT NOTE │
4+
# │ │
5+
# │ This file is synced with https://github.com/atomicgo/template │
6+
# │ │
7+
# │ Please apply all changes to the template repository │
8+
# │ │
9+
# └───────────────────────────────────────────────────────────────────┘
10+
11+
version: "3"
12+
13+
tasks:
14+
test:
15+
desc: Run all tests
16+
cmds:
17+
- go test ./...
18+
tdd:
19+
desc: Test Driven Development - Watch tests
20+
watch: true
21+
sources:
22+
- "**/*.go"
23+
cmds:
24+
- go test ./...
25+
26+
lint:
27+
desc: Run all linters
28+
cmds:
29+
- go mod tidy
30+
- wsl --allow-cuddle-declarations --force-err-cuddling --force-case-trailing-whitespace 3 --fix ./...
31+
- golangci-lint run

0 commit comments

Comments
 (0)