-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Context
SwiftLint was introduced in the project (PR pending). Several structural rules were disabled because the existing codebase has violations that require significant refactoring to fix. These should be re-enabled incrementally.
Disabled rules to re-enable
cyclomatic_complexity (25 violations when last checked)
Functions in Configurator.swift, CLIOutput.swift, GlobalSyncStrategy.swift, and others have complexity 11-31 (default threshold: 10). Requires breaking complex functions into smaller, focused methods.
type_body_length (24 violations when last checked)
Structs in both Sources (11) and Tests (13) exceed 250-line bodies. Sources violations concentrated in Configurator, CLIOutput, ExternalPackManifest. Test structs naturally grow large — consider splitting test files or adjusting thresholds for tests.
file_length (22 violations when last checked)
Files exceeding 400 lines. Directly correlated with type_body_length — fixing one will largely fix the other.
Approach
- Address
cyclomatic_complexityfirst — it's the most impactful for code quality type_body_lengthandfile_lengthwill improve as complex functions are extracted- Consider different thresholds for test files vs source files
- Re-enable each rule in
.swiftlint.ymlas violations are cleared
References
.swiftlint.yml— rules marked with# TODO: Re-enable after refactoring