.qlty/qlty.toml
64 lines · 1673 bytes
1config_version = "0"
2
3exclude_patterns = [
4 "**/vendor/**",
5 "**/node_modules/**",
6 "**/testdata/**",
7 "**/dist/**",
8 "**/.build/**",
9 "**/build/**",
10 "**/*.min.*",
11 "**/generated/**",
12 ".claude/**",
13 "**/Pods/**",
14]
15
16test_patterns = [
17 "**/test/**",
18 "**/tests/**",
19 "**/Tests/**",
20 "**/*_test.*",
21 "**/test_*.*",
22 "**/*.test.*",
23 "**/*Tests.swift",
24 "e2e/**",
25]
26
27[[source]]
28name = "default"
29default = true
30
31[[plugin]]
32name = "osv-scanner"
33
34[[plugin]]
35name = "trufflehog"
36
37# Early returns are guard clauses, which keep the happy path unindented.
38[smells.return_statements]
39enabled = false
40
41# Function and file complexity are left to review rather than counted.
42[smells.function_complexity]
43enabled = false
44
45[smells.file_complexity]
46enabled = false
47
48# Exhaustive switch-over-enum lookup tables share shape but not content.
49[language.swift.smells.duplication]
50# The widget extension is its own target with its own decodeDateString; each paging view model
51# owns its cursor state in loadMore...IfNeeded; calls to the shared load-state views differ only in
52# their arguments.
53filter_patterns = [
54 "(import_declaration _)",
55 "(switch_statement _)",
56 "(function_declaration name: (simple_identifier) @_n (#eq? @_n \"decodeDateString\"))",
57 "(function_declaration name: (simple_identifier) @_n (#match? @_n \"^loadMore[A-Za-z]*IfNeeded$\"))",
58 "(call_expression (simple_identifier) @_n (#match? @_n \"^(SearchableListState|SRHTLoadStateView)$\"))",
59]
60
61# tree-sitter-swift nests each `else if` inside the previous branch, so a one-line `if` in the
62# fourth branch of a flat chain reports level 5.
63[language.swift.smells.nested_control_flow]
64enabled = false