2021-11-14 20:01:54 +00:00
|
|
|
linters-settings:
|
|
|
|
gofmt:
|
2021-11-14 21:33:45 +00:00
|
|
|
simplify: true
|
2023-11-29 19:21:18 +00:00
|
|
|
rewrite-rules:
|
|
|
|
- pattern: interface{}
|
|
|
|
replacement: any
|
2021-11-24 01:01:12 +00:00
|
|
|
misspell:
|
|
|
|
locale: US
|
2022-01-06 06:44:14 +00:00
|
|
|
gofumpt:
|
|
|
|
extra-rules: true
|
2023-03-20 23:48:15 +00:00
|
|
|
forbidigo:
|
|
|
|
forbid:
|
|
|
|
- context\.WithCancel$
|
|
|
|
- ^print.*$
|
|
|
|
- panic
|
2023-12-14 09:18:14 +00:00
|
|
|
- ^log.Fatal().*$
|
2023-03-20 23:48:15 +00:00
|
|
|
errorlint:
|
|
|
|
errorf-multi: true
|
2023-12-29 20:19:42 +00:00
|
|
|
depguard:
|
|
|
|
rules:
|
|
|
|
pipeline:
|
|
|
|
list-mode: lax
|
|
|
|
files:
|
|
|
|
- '**/pipeline/**/*.go'
|
|
|
|
- '**/pipeline/*.go'
|
|
|
|
- '!**/cli/pipeline/*.go'
|
|
|
|
- '!**/cli/pipeline/**/*.go'
|
|
|
|
- '!**/server/pipeline/*.go'
|
|
|
|
- '!**/server/pipeline/**/*.go'
|
|
|
|
deny:
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/agent'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/cli'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/cmd'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/server'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/web'
|
|
|
|
shared:
|
|
|
|
list-mode: lax
|
|
|
|
files:
|
|
|
|
- '**/shared/**/*.go'
|
|
|
|
- '**/shared/*.go'
|
|
|
|
- '!**/pipeline/shared/*.go'
|
|
|
|
- '!**/pipeline/shared/**/*.go'
|
|
|
|
deny:
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/agent'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/cli'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/cmd'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/pipeline'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/server'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/web'
|
|
|
|
woodpecker-go:
|
|
|
|
list-mode: lax
|
|
|
|
files:
|
|
|
|
- '**/woodpecker-go/woodpecker/**/*.go'
|
|
|
|
- '**/woodpecker-go/woodpecker/*.go'
|
|
|
|
deny:
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/agent'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/cli'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/cmd'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/pipeline'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/server'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/shared'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/web'
|
|
|
|
agent:
|
|
|
|
list-mode: lax
|
|
|
|
files:
|
|
|
|
- '**/agent/**/*.go'
|
|
|
|
- '**/agent/*.go'
|
|
|
|
- '**/cmd/agent/**/*.go'
|
|
|
|
- '**/cmd/agent/*.go'
|
|
|
|
deny:
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/cli'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/cmd/cli'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/cmd/server'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/server'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/web'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/woodpecker-go/woodpecker'
|
|
|
|
cli:
|
|
|
|
list-mode: lax
|
|
|
|
files:
|
|
|
|
- '**/cli/**/*.go'
|
|
|
|
- '**/cli/*.go'
|
|
|
|
- '**/cmd/cli/**/*.go'
|
|
|
|
- '**/cmd/cli/*.go'
|
|
|
|
deny:
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/agent'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/server'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/cmd/agent'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/cmd/server'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/web'
|
|
|
|
server:
|
|
|
|
list-mode: lax
|
|
|
|
files:
|
|
|
|
- '**/server/**/*.go'
|
|
|
|
- '**/server/*.go'
|
|
|
|
- '**/cmd/server/**/*.go'
|
|
|
|
- '**/cmd/server/*.go'
|
|
|
|
- '**/web/**/*.go'
|
|
|
|
- '**/web/*.go'
|
|
|
|
deny:
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/agent'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/cli'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/cmd/agent'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/cmd/cli'
|
|
|
|
- pkg: 'go.woodpecker-ci.org/woodpecker/v2/woodpecker-go/woodpecker'
|
2024-01-09 20:35:37 +00:00
|
|
|
gci:
|
2024-01-14 17:22:06 +00:00
|
|
|
custom-order: true
|
2024-01-09 20:35:37 +00:00
|
|
|
sections:
|
|
|
|
- standard
|
|
|
|
- default
|
|
|
|
- prefix(go.woodpecker-ci.org/woodpecker)
|
2024-05-13 20:58:21 +00:00
|
|
|
mnd:
|
2024-01-09 20:35:37 +00:00
|
|
|
ignored-numbers:
|
|
|
|
- '0o600'
|
|
|
|
- '0o660'
|
|
|
|
- '0o644'
|
|
|
|
- '0o755'
|
|
|
|
- '0o700'
|
|
|
|
ignored-functions:
|
|
|
|
- make
|
|
|
|
- time.*
|
|
|
|
- strings.Split
|
|
|
|
- callerName
|
|
|
|
- securecookie.GenerateRandomKey
|
2024-05-13 20:58:21 +00:00
|
|
|
godot:
|
|
|
|
scope: toplevel
|
|
|
|
period: true
|
|
|
|
capital: true
|
|
|
|
exclude:
|
|
|
|
- '^\s*cSpell:'
|
|
|
|
- '^\s*TODO:'
|
2021-11-14 20:01:54 +00:00
|
|
|
|
|
|
|
linters:
|
|
|
|
disable-all: true
|
|
|
|
enable:
|
2021-12-01 13:43:35 +00:00
|
|
|
- bidichk
|
|
|
|
- errcheck
|
2021-11-14 20:01:54 +00:00
|
|
|
- gofmt
|
2021-11-23 14:36:52 +00:00
|
|
|
- gosimple
|
2021-12-01 13:43:35 +00:00
|
|
|
- govet
|
|
|
|
- ineffassign
|
2021-11-24 01:01:12 +00:00
|
|
|
- misspell
|
2021-12-01 13:43:35 +00:00
|
|
|
- revive
|
2021-11-25 16:15:36 +00:00
|
|
|
- staticcheck
|
2021-12-01 13:43:35 +00:00
|
|
|
- typecheck
|
2021-11-27 14:29:37 +00:00
|
|
|
- unused
|
2022-01-06 06:44:14 +00:00
|
|
|
- gofumpt
|
2023-02-01 23:08:02 +00:00
|
|
|
- errorlint
|
2023-03-20 23:48:15 +00:00
|
|
|
- forbidigo
|
2023-10-04 13:48:56 +00:00
|
|
|
- zerologlint
|
2023-12-29 20:19:42 +00:00
|
|
|
- depguard
|
2024-01-09 20:35:37 +00:00
|
|
|
- asciicheck
|
|
|
|
- bodyclose
|
|
|
|
- dogsled
|
|
|
|
- durationcheck
|
|
|
|
- errchkjson
|
|
|
|
- gochecknoinits
|
|
|
|
- goheader
|
|
|
|
- gomoddirectives
|
|
|
|
- gomodguard
|
|
|
|
- goprintffuncname
|
|
|
|
- importas
|
|
|
|
- makezero
|
|
|
|
- rowserrcheck
|
|
|
|
- sqlclosecheck
|
|
|
|
- tenv
|
|
|
|
- unconvert
|
|
|
|
- unparam
|
|
|
|
- wastedassign
|
|
|
|
- whitespace
|
2024-01-10 14:34:44 +00:00
|
|
|
- gocritic
|
2024-01-10 11:11:18 +00:00
|
|
|
- nolintlint
|
2024-01-10 21:56:42 +00:00
|
|
|
- stylecheck
|
2024-01-11 21:15:15 +00:00
|
|
|
- contextcheck
|
2024-01-12 01:01:02 +00:00
|
|
|
- forcetypeassert
|
2024-01-14 17:22:06 +00:00
|
|
|
- gci
|
2024-05-13 20:58:21 +00:00
|
|
|
- mnd
|
|
|
|
- godot
|
2024-03-15 17:00:25 +00:00
|
|
|
|
|
|
|
issues:
|
|
|
|
exclude-rules:
|
|
|
|
- path: 'fixtures|cmd/agent/flags.go|cmd/server/flags.go|pipeline/backend/kubernetes/flags.go|_test.go'
|
|
|
|
linters:
|
2024-05-13 20:58:21 +00:00
|
|
|
- mnd
|
2021-11-25 23:27:43 +00:00
|
|
|
|
2021-11-16 20:07:53 +00:00
|
|
|
run:
|
2023-12-29 20:19:42 +00:00
|
|
|
timeout: 15m
|
2024-06-25 10:23:07 +00:00
|
|
|
build-tags:
|
|
|
|
- test
|