Skip to content

Commit df5782b

Browse files
committed
chore: updated template files
1 parent e6f49f2 commit df5782b

File tree

3 files changed

+27
-22
lines changed

3 files changed

+27
-22
lines changed

.github/workflows/atomicgo.yml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ name: AtomicGo
1010
on:
1111
push:
1212
branches: [main]
13+
workflow_dispatch:
1314

1415
jobs:
1516
docs:

.golangci.yml

+25-21
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ linters:
3939
- funlen # check for long functions
4040
- gci # controls Go package import order and makes it always deterministic
4141
- gocheckcompilerdirectives # checks that go compiler directive comments (//go:) are valid
42-
- gochecknoglobals # checks that no globals are used
4342
- gochecksumtype # exhaustiveness checks on Go "sum types"
4443
- gocognit # check for high cognitive complexity
4544
- gocritic # Go source code linter that provides a ton of rules
@@ -122,6 +121,7 @@ linters:
122121
- gomnd # deprecated
123122
- mnd # too many detections
124123
- cyclop # covered by gocyclo
124+
- gochecknoglobals # there are many valid reasons for global variables, depending on the project
125125

126126
linters-settings:
127127
wsl:
@@ -147,26 +147,30 @@ linters-settings:
147147
ignore-map-index-ok: true
148148
ignore-chan-recv-ok: true
149149
ignore-decls:
150-
- n int
151-
- x int
152-
- y int
153-
- z int
154-
- i int
155-
- a int
156-
- b int
157-
- c int
158-
- j int
159-
- T any
160-
- a any
161-
- b any
162-
- c any
163-
- d any
164-
- data any
165-
- n any
166-
- f func()
167-
- cb func()
168-
- t testing.T
169-
- b testing.B
150+
- n int # generic number
151+
- x int # generic number (e.g. coordinate)
152+
- y int # generic number (e.g. coordinate)
153+
- z int # generic number (e.g. coordinate)
154+
- i int # generic number
155+
- a int # generic number
156+
- r int # generic number (e.g. red or radius)
157+
- g int # generic number (e.g. green)
158+
- b int # generic number (e.g. blue)
159+
- c int # generic number (e.g. count)
160+
- j int # generic number (e.g. index)
161+
- T any # generic type
162+
- a any # generic any (e.g. data)
163+
- b any # generic any (e.g. body)
164+
- c any # generic any
165+
- d any # generic any (e.g. data)
166+
- data any # generic data
167+
- n any # generic any
168+
- t time.Time # often used as a variable name
169+
- f func() # often used as a callback variable name
170+
- cb func() # often used as a callback variable name
171+
- t testing.T # default testing.T variable name
172+
- b testing.B # default testing.B variable name
173+
- sb strings.Builder # often used as a variable name
170174

171175
issues:
172176
exclude-rules:

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ lint:
1414
@echo "## Go mod tidy..."
1515
@go mod tidy
1616
@echo "## Fixing whitespaces..."
17-
@wsl --allow-cuddle-declarations --force-err-cuddling --fix ./...
17+
@wsl --allow-cuddle-declarations --force-err-cuddling --force-case-trailing-whitespace 3 --fix ./...
1818
@echo "## Running golangci-lint..."
1919
@golangci-lint run

0 commit comments

Comments
 (0)