-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy path.golangci.yml
More file actions
49 lines (46 loc) · 1.34 KB
/
Copy path.golangci.yml
File metadata and controls
49 lines (46 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
version: "2"
linters:
default: standard
enable:
- exhaustive
- forbidigo
settings:
exhaustive:
# Only switches annotated with an //exhaustive:enforce comment are
# checked. A default arm does not satisfy the check, so an enforced
# switch flags any enum constant it does not name explicitly.
explicit-exhaustive-switch: true
forbidigo:
analyze-types: true
forbid:
- pattern: ^os\.Exit$
pkg: ^os$
msg: os.Exit is only allowed in main.go
- pattern: ^log\.Fatal(f|ln)?$
pkg: ^log$
msg: log.Fatal is forbidden; return an error to the global executor
- pattern: ^tea\.(WithAltScreen|EnterAltScreen|Program\.EnterAltScreen)$
pkg: ^github\.com/charmbracelet/bubbletea$
msg: full-screen Bubble Tea programs must launch through runFullScreenTUI
exclusions:
rules:
- path: ^main\.go$
text: os.Exit is only allowed in main.go
linters:
- forbidigo
- path: ^tools/
linters:
- forbidigo
- path: ^cmd/fullscreen\.go$
text: full-screen Bubble Tea programs must launch through runFullScreenTUI
linters:
- forbidigo
- path: _test\.go$
linters:
- forbidigo
formatters:
enable:
- gofmt
issues:
exclude-dirs:
- e2e