-
-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy path.swiftlint.yml
More file actions
54 lines (47 loc) · 2.2 KB
/
Copy path.swiftlint.yml
File metadata and controls
54 lines (47 loc) · 2.2 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
# swiftlint config for agterm — tailored, low-noise.
# philosophy: disable only rules that fight deliberate project conventions; keep every
# rule that surfaces a real, fixable finding on; hold source files under 1000 lines and
# test files under 2000 (via nested configs in agtermUITests/, agtermTests/, and agtermCore/Tests/).
excluded:
- build # xcodebuild DerivedData
- .build # SwiftPM build (root)
- agtermCore/.build # SwiftPM build + vendored checkouts
- .claude/worktrees # concurrent git worktrees (gitignored) carry their own .build/checkouts
- GhosttyKit.xcframework
- agterm/Resources
disabled_rules:
- identifier_name # short local names (lmt, id, x, y) are deliberate — CLAUDE.md
- trailing_comma # style preference, not a defect
- force_try # `try!` is idiomatic in tests; 0 in production code
- optional_data_string_conversion # we want lossy String(decoding:as:) for terminal/process bytes
# (best-effort, never nil), not the failable initializer
type_name:
excluded:
- agtermApp # the @main App struct is deliberately brand-lowercase
- Go # the `session go` CLI subcommand type is short by design
line_length:
warning: 200 # code deliberately runs long; flag only genuinely long lines
error: 400
ignores_comments: true
ignores_urls: true
# size limits: source files stay under 1000 lines, source type bodies under 800.
# the biggest source file is agterm/Ghostty/GhosttySurfaceView.swift; test files get a
# 2000-line budget via nested configs (agtermUITests/, agtermTests/, agtermCore/Tests/).
file_length:
warning: 1000
error: 1100
type_body_length:
warning: 800
error: 1000
function_body_length:
warning: 250
error: 400
cyclomatic_complexity:
warning: 25
error: 50
ignores_case_statements: true # a flat command-dispatch switch is not "complex"
nesting:
type_level: 2 # tightly-scoped private helper types nested 2 deep are idiomatic
large_tuple:
warning: 3 # 3-member named returns are fine; 4+ should become a struct
error: 5