Skip to content

Commit 332c0cf

Browse files
committed
Add stricter linter definitions
Signed-off-by: apostasie <spam_blackhole@farcloser.world>
1 parent 3dd40b3 commit 332c0cf

2 files changed

Lines changed: 57 additions & 0 deletions

File tree

mod/tigron/.golangci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
run:
3+
# If it is explicitly set to 0 (i.e. not the default) then golangci-lint will automatically set the value to match Linux container CPU quota.
4+
concurrency: 0
5+
timeout: 5m
6+
issues-exit-code: 2
7+
tests: true
8+
modules-download-mode: readonly
9+
allow-parallel-runners: true
10+
allow-serial-runners: true
11+
go: '1.23'
12+
13+
linters:
14+
disable-all: false
15+
enable-all: true
16+
disable:
17+
# namedreturns are useful occasionally
18+
- nonamedreturns
19+
# duplicate
20+
- tenv
21+
# These are just too annoying without much value
22+
- exhaustruct # this is fine without, usually
23+
- funlen # somewhat ridiculous
24+
- cyclop
25+
- godox
26+
# TODO(apostasie) Temporary out until we wrap up all of them
27+
- wrapcheck
28+
29+
# We us go-imports instead
30+
- gci
31+
32+
linters-settings:
33+
staticcheck:
34+
checks:
35+
- "all"
36+
37+
depguard:
38+
rules:
39+
main:
40+
files:
41+
- "$all"
42+
allow:
43+
- $gostd
44+
- "github.com/containerd/nerdctl/mod/tigron"

mod/tigron/.yamllint

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
3+
extends: default
4+
5+
rules:
6+
indentation:
7+
spaces: 2
8+
indent-sequences: consistent
9+
truthy:
10+
allowed-values: ['true', 'false', 'on', 'off']
11+
comments-indentation: disable
12+
document-start: disable
13+
line-length: disable

0 commit comments

Comments
 (0)