diff --git a/.swiftformat b/apple/.swiftformat similarity index 100% rename from .swiftformat rename to apple/.swiftformat diff --git a/.swiftlint.yml b/apple/.swiftlint.yml similarity index 87% rename from .swiftlint.yml rename to apple/.swiftlint.yml index 1068985d..37b464e3 100644 --- a/.swiftlint.yml +++ b/apple/.swiftlint.yml @@ -1,8 +1,9 @@ # SwiftLint configuration for Swift 6 compatibility -# Focuses on modern Swift best practices without conflicting self rules +# Shared configuration for both macOS and iOS apps included: - - VibeTunnel + - ../mac/VibeTunnel + - ../ios/VibeTunnel excluded: - Carthage @@ -10,8 +11,13 @@ excluded: - DerivedData - .build - .swiftpm - - VibeTunnelTests - - VibeTunnelUITests + - ../mac/VibeTunnelTests + - ../mac/VibeTunnelUITests + - ../ios/VibeTunnelTests + - ../mac/build + - ../ios/build + - Package.swift + - *.xcodeproj # Rule configuration opt_in_rules: @@ -38,6 +44,7 @@ opt_in_rules: - force_unwrapping - identical_operands - implicit_return + - implicitly_unwrapped_optional - joined_default_parameter - last_where - legacy_multiple @@ -56,6 +63,8 @@ opt_in_rules: - private_action - private_outlet - prohibited_super_call + - reduce_boolean + - reduce_into - redundant_nil_coalescing - redundant_type_annotation - sorted_first_last @@ -120,8 +129,8 @@ custom_rules: message: "Use proper logging instead of print statements" severity: warning excluded: - - "VibeTunnelTests/*" - - "VibeTunnelUITests/*" + - "*/Tests/*" + - "*/UITests/*" analyzer_rules: - unused_import diff --git a/ios/.swiftformat b/ios/.swiftformat new file mode 120000 index 00000000..07fad725 --- /dev/null +++ b/ios/.swiftformat @@ -0,0 +1 @@ +../apple/.swiftformat \ No newline at end of file diff --git a/ios/.swiftlint.yml b/ios/.swiftlint.yml deleted file mode 100644 index 2c82e9dc..00000000 --- a/ios/.swiftlint.yml +++ /dev/null @@ -1,39 +0,0 @@ -# SwiftLint configuration for VibeTunnel iOS - -# Adjust file length thresholds -file_length: - warning: 800 - error: 1000 - ignore_comment_only_lines: true - -# Adjust type body length thresholds -type_body_length: - warning: 500 - error: 800 - -# Keep other rules at their defaults -line_length: - warning: 120 - error: 200 - ignores_urls: true - ignores_function_declarations: true - ignores_comments: true - -# Opt-in rules -opt_in_rules: - - empty_count - - empty_string - - first_where - - force_unwrapping - - implicitly_unwrapped_optional - - last_where - - reduce_boolean - - reduce_into - - yoda_condition - -# Excluded paths -excluded: - - .build - - Package.swift - - VibeTunnel.xcodeproj - - VibeTunnelTests \ No newline at end of file diff --git a/ios/.swiftlint.yml b/ios/.swiftlint.yml new file mode 120000 index 00000000..caf4ffcc --- /dev/null +++ b/ios/.swiftlint.yml @@ -0,0 +1 @@ +../apple/.swiftlint.yml \ No newline at end of file diff --git a/mac/.swiftformat b/mac/.swiftformat new file mode 120000 index 00000000..07fad725 --- /dev/null +++ b/mac/.swiftformat @@ -0,0 +1 @@ +../apple/.swiftformat \ No newline at end of file diff --git a/mac/.swiftlint.yml b/mac/.swiftlint.yml new file mode 120000 index 00000000..caf4ffcc --- /dev/null +++ b/mac/.swiftlint.yml @@ -0,0 +1 @@ +../apple/.swiftlint.yml \ No newline at end of file