|
9 | 9 | # to stop erroring, left as a warning, documented here). |
10 | 10 | # |
11 | 11 | # CI runs `swiftlint lint --strict --baseline .swiftlint-baseline.json`: |
12 | | -# the baseline freezes 138 pre-existing violations by identity (rule + file + |
| 12 | +# the baseline freezes 134 pre-existing violations by identity (rule + file + |
13 | 13 | # line) so `--strict` still catches every new violation, including a new one |
14 | 14 | # in an already-baselined file, without forcing a refactor of any of them |
15 | | -# just to silence the linter. By rule: `line_length` 80 (mostly long test |
| 15 | +# just to silence the linter. By rule: `line_length` 78 (mostly long test |
16 | 16 | # lines and interpolated diagnostics), `type_body_length` 16, `large_tuple` |
17 | | -# 13, `function_body_length` 10, `function_parameter_count` 6, |
18 | | -# `cyclomatic_complexity` 4, `file_length` 5, `force_try` 2, plus one |
| 17 | +# 13, `function_body_length` 9, `function_parameter_count` 6, |
| 18 | +# `file_length` 5, `cyclomatic_complexity` 3, `force_try` 2, plus one |
19 | 19 | # `unused_enumerated` and one `orphaned_doc_comment`. The length/complexity |
20 | 20 | # rules concentrate in a few deliberately large orchestration files |
21 | 21 | # (MutationRunner.swift, SchemataMutationRunner.swift, XcodeBuildAdapter.swift |
22 | | -# and similar), but `cyclomatic_complexity` also covers a ReproduceCommand |
23 | | -# handler (13), ConfigurationValidation (13), DeclarationIdentityResolver |
24 | | -# (15) and one simulator-pool test — and `large_tuple` is spread across |
25 | | -# several test files. This count includes a handful of entries private-tree- |
26 | | -# only targets (research/probe executables, benchmark harness) contribute |
27 | | -# that the public projection's own baseline doesn't carry, since those |
28 | | -# targets are excluded from the public snapshot. (Earlier versions of this |
29 | | -# comment also named InspectCommand.run()/RunCommand.run(), and then |
30 | | -# QualityGate.evaluate (16)/BudgetSelectorV2.allocateCounts (18); all four |
31 | | -# have since been split far enough that none is baselined anymore.) |
| 22 | +# and similar), but `cyclomatic_complexity` also covers ConfigurationValidation |
| 23 | +# (13), DeclarationIdentityResolver (15) and one simulator-pool test — and |
| 24 | +# `large_tuple` is spread across several test files. This count includes a |
| 25 | +# handful of entries private-tree-only targets (research/probe executables, |
| 26 | +# benchmark harness) contribute that the public projection's own baseline |
| 27 | +# doesn't carry, since those targets are excluded from the public snapshot. |
| 28 | +# (Earlier versions of this comment also named InspectCommand.run()/ |
| 29 | +# RunCommand.run(), then QualityGate.evaluate (16)/ |
| 30 | +# BudgetSelectorV2.allocateCounts (18), then a ReproduceCommand handler (13); |
| 31 | +# all five have since been split far enough that none is baselined anymore.) |
32 | 32 | # |
33 | 33 | # Baseline entries key on line number, so an unrelated edit earlier in a |
34 | 34 | # baselined file shifts every violation below it and makes CI fail on an |
@@ -137,3 +137,10 @@ disabled_rules: |
137 | 137 | # oversight — forcing the failable initializer here would just add an |
138 | 138 | # unwrap for a case that can't happen. |
139 | 139 | - optional_data_string_conversion |
| 140 | + |
| 141 | +# Compiler-aware rules: these run ONLY under `swiftlint analyze` with a |
| 142 | +# clean xcodebuild log, never under `swiftlint lint`. Scope is deliberately |
| 143 | +# one rule: `unused_import` catches exactly the failure class a pure file |
| 144 | +# move introduces (a leftover import no syntax-only rule sees). |
| 145 | +analyzer_rules: |
| 146 | + - unused_import |
0 commit comments