Impact
make dev-lint currently spends most of its time in the SwiftLint phase when running full-repo style validation. The SwiftFormat phase is comparatively small; SwiftLint dominates the coordinated lint wall time.
Evidence
Environment:
- Repo commit:
84eb163f
- macOS:
26.5.2
- Architecture:
arm64
- SwiftLint:
0.63.3
Observed timings on the same checkout:
make dev-lint: 118.41s total
- SwiftFormat phase:
7.03s
- SwiftLint phase dominated the remaining time
- SwiftLint command shape:
swiftlint lint --strict --config .swiftlint.yml --use-script-input-files
Direct SwiftLint comparisons:
-
Config-discovered full-repo lint:
swiftlint lint --strict --config .swiftlint.yml --quiet
4.15s to 5.16s
-
Current script-input shape over the same scoped file list:
swiftlint lint --strict --config .swiftlint.yml --use-script-input-files --quiet
14.56s to 26.78s
-
Current script-input shape without --quiet:
-
Config-discovered lint without cache:
swiftlint lint --strict --config .swiftlint.yml --quiet --no-cache
50.88s
This suggests the full-repo lint path is paying a large penalty for feeding SwiftLint 1,427 individual SCRIPT_INPUT_FILE_* entries, and may also interact poorly with SwiftLint cache behavior and conductor log volume.
Recommendation
For full-repo lint in Scripts/swift_style.sh, prefer the config-discovered SwiftLint path:
swiftlint lint --strict --config "$ROOT_DIR/.swiftlint.yml" --quiet
Optionally include --force-exclude for belt-and-suspenders exclusion behavior.
Before switching, make .swiftlint.yml fully mirror the wrapper's excluded file scope if exact parity matters, including the large workflow prompt files that Scripts/swift_style.sh currently excludes from the explicit file list.
Keep --use-script-input-files only for a future focused/changed-file lint mode where the file set is materially smaller than the full repo.
Acceptance Criteria
make dev-lint still validates the intended first-party Swift scope.
- SwiftLint does not lint generated, vendored, build, or transient directories.
- Full-repo SwiftLint wall time is closer to config-discovered timings than the current script-input timings.
- Conductor lint output remains bounded and useful.
Impact
make dev-lintcurrently spends most of its time in the SwiftLint phase when running full-repo style validation. The SwiftFormat phase is comparatively small; SwiftLint dominates the coordinated lint wall time.Evidence
Environment:
84eb163f26.5.2arm640.63.3Observed timings on the same checkout:
make dev-lint:118.41stotal7.03sswiftlint lint --strict --config .swiftlint.yml --use-script-input-filesDirect SwiftLint comparisons:
Config-discovered full-repo lint:
swiftlint lint --strict --config .swiftlint.yml --quiet4.15sto5.16sCurrent script-input shape over the same scoped file list:
swiftlint lint --strict --config .swiftlint.yml --use-script-input-files --quiet14.56sto26.78sCurrent script-input shape without
--quiet:18.67sConfig-discovered lint without cache:
swiftlint lint --strict --config .swiftlint.yml --quiet --no-cache50.88sThis suggests the full-repo lint path is paying a large penalty for feeding SwiftLint 1,427 individual
SCRIPT_INPUT_FILE_*entries, and may also interact poorly with SwiftLint cache behavior and conductor log volume.Recommendation
For full-repo
lintinScripts/swift_style.sh, prefer the config-discovered SwiftLint path:swiftlint lint --strict --config "$ROOT_DIR/.swiftlint.yml" --quietOptionally include
--force-excludefor belt-and-suspenders exclusion behavior.Before switching, make
.swiftlint.ymlfully mirror the wrapper's excluded file scope if exact parity matters, including the large workflow prompt files thatScripts/swift_style.shcurrently excludes from the explicit file list.Keep
--use-script-input-filesonly for a future focused/changed-file lint mode where the file set is materially smaller than the full repo.Acceptance Criteria
make dev-lintstill validates the intended first-party Swift scope.