-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
73 lines (70 loc) · 2.3 KB
/
Copy path.golangci.yml
File metadata and controls
73 lines (70 loc) · 2.3 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
version: "2"
run:
timeout: 5m
linters:
default: none
enable:
- errcheck
- govet
- ineffassign
- misspell
- staticcheck
- unused
- depguard
# Note: revive is intentionally NOT enabled in Phase A. Its `exported`
# rule would require doc comments on every exported symbol, which is
# bikeshedding at scaffold stage. Reconsider in a later phase.
settings:
depguard:
rules:
cli-may-not-import-domain:
list-mode: lax
files:
- "**/internal/cli/**"
- "!**/_test.go"
deny:
- pkg: "github.com/nixrajput/siphon/internal/driver"
desc: "CLI must go through internal/app, not Driver directly"
tui-may-not-import-cli:
list-mode: lax
files:
- "**/internal/tui/**"
- "!**/_test.go"
deny:
- pkg: "github.com/nixrajput/siphon/internal/cli"
desc: "TUI and CLI are siblings and may not depend on each other"
cli-may-not-import-tui-except-root:
list-mode: lax
files:
- "**/internal/cli/**"
- "!**/internal/cli/root.go"
- "!**/_test.go"
deny:
- pkg: "github.com/nixrajput/siphon/internal/tui"
desc: "Only the root command may launch the TUI"
driver-may-not-import-presentation:
list-mode: lax
files:
- "**/internal/driver/**"
- "!**/_test.go"
deny:
- pkg: "github.com/nixrajput/siphon/internal/cli"
desc: "Drivers must not depend on presentation"
- pkg: "github.com/nixrajput/siphon/internal/tui"
desc: "Drivers must not depend on presentation"
- pkg: "github.com/nixrajput/siphon/internal/app"
desc: "Drivers must not depend on Application — dependency flows down"
exclusions:
# web/ is the Next.js site; its node_modules can vendor stray .go files
# (e.g. flatted/golang) that are not siphon code. Keep the Go linters off
# the JS subtree. (node_modules is gitignored, so CI never sees it on a
# fresh checkout; this keeps local lint consistent with CI.)
paths:
- web
rules:
- path: _test\.go
linters:
- errcheck
formatters:
enable:
- gofmt