Skip to content

Commit

Permalink
chore: updated template files
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinJWendt committed Jul 13, 2024
1 parent 99077ba commit ab7b65f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 22 deletions.
1 change: 1 addition & 0 deletions .github/workflows/atomicgo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ name: AtomicGo
on:
push:
branches: [main]
workflow_dispatch:

jobs:
docs:
Expand Down
46 changes: 25 additions & 21 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ linters:
- funlen # check for long functions
- gci # controls Go package import order and makes it always deterministic
- gocheckcompilerdirectives # checks that go compiler directive comments (//go:) are valid
- gochecknoglobals # checks that no globals are used
- gochecksumtype # exhaustiveness checks on Go "sum types"
- gocognit # check for high cognitive complexity
- gocritic # Go source code linter that provides a ton of rules
Expand Down Expand Up @@ -122,6 +121,7 @@ linters:
- gomnd # deprecated
- mnd # too many detections
- cyclop # covered by gocyclo
- gochecknoglobals # there are many valid reasons for global variables, depending on the project

linters-settings:
wsl:
Expand All @@ -147,26 +147,30 @@ linters-settings:
ignore-map-index-ok: true
ignore-chan-recv-ok: true
ignore-decls:
- n int
- x int
- y int
- z int
- i int
- a int
- b int
- c int
- j int
- T any
- a any
- b any
- c any
- d any
- data any
- n any
- f func()
- cb func()
- t testing.T
- b testing.B
- n int # generic number
- x int # generic number (e.g. coordinate)
- y int # generic number (e.g. coordinate)
- z int # generic number (e.g. coordinate)
- i int # generic number
- a int # generic number
- r int # generic number (e.g. red or radius)
- g int # generic number (e.g. green)
- b int # generic number (e.g. blue)
- c int # generic number (e.g. count)
- j int # generic number (e.g. index)
- T any # generic type
- a any # generic any (e.g. data)
- b any # generic any (e.g. body)
- c any # generic any
- d any # generic any (e.g. data)
- data any # generic data
- n any # generic any
- t time.Time # often used as a variable name
- f func() # often used as a callback variable name
- cb func() # often used as a callback variable name
- t testing.T # default testing.T variable name
- b testing.B # default testing.B variable name
- sb strings.Builder # often used as a variable name

issues:
exclude-rules:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ lint:
@echo "## Go mod tidy..."
@go mod tidy
@echo "## Fixing whitespaces..."
@wsl --allow-cuddle-declarations --force-err-cuddling --fix ./...
@wsl --allow-cuddle-declarations --force-err-cuddling --force-case-trailing-whitespace 3 --fix ./...
@echo "## Running golangci-lint..."
@golangci-lint run

0 comments on commit ab7b65f

Please sign in to comment.