Commit Graph

4136 Commits

Author SHA1 Message Date
Danny Mösch 23d218c0a8 Prepare 0.62.1 release 2025-10-13 20:57:16 +00:00
Danny Mösch 25ef2ea69b Remove trailing comma (#6297) 2025-10-13 22:56:24 +02:00
Danny Mösch fb030b9cf1 Prepare 0.62.0 release 2025-10-13 18:19:32 +00:00
Nandhini Subramani a23e4c98bc Exclude integer generic parameters from generic_type_name and handle them in identifier_name (#6289) 2025-10-10 23:07:41 +02:00
Kirti Verma 9a61f48c7a Add prefer_asset_symbols rule (#6261)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2025-10-10 15:28:16 -04:00
Nandhini Subramani a0414c919d Ignore @concurrent functions in async_without_await rule (#6284) 2025-10-08 19:06:56 +02:00
Danny Mösch 4065fc8437 Enable upcoming feature MemberImportVisibility (#6286) 2025-10-08 08:12:05 +02:00
Kirill Yakimovich fbaf1e75c5 Fix Xcode project generation (#6277) 2025-10-06 18:54:59 +00:00
Danny Mösch a6247c24e4 Rewrite sorted_imports rule with SwiftSyntax (#6280) 2025-10-05 17:00:27 +02:00
Danny Mösch e9718145cb Rewrite modifier_order rule with SwiftSyntax (#6279) 2025-10-04 16:39:17 +02:00
Danny Mösch bae9a2a351 Remove deprecated connectivity check (#6278) 2025-10-04 11:35:34 +02:00
Danny Mösch 9b3b538a18 Add @WorkingDirectory and @TemporaryDirectory macros to be used in tests 2025-10-03 22:41:38 +02:00
Danny Mösch bad724fb73 Extract macro helper functions 2025-10-03 22:41:38 +02:00
Danny Mösch 61558ce766 Separate @main macro provider allowing to exclude it from Bazel build
Avoids linker error in tests due to duplicated `_main` routine.
2025-10-03 22:41:38 +02:00
Danny Mösch 58be16cd0e Use task-local parser diagnostic toggle (#6273) 2025-10-03 22:34:32 +02:00
Danny Mösch 530bf9d0c5 Let legacy function rules adhere to @SwiftSyntaxRule (#6271) 2025-10-03 08:03:59 -04:00
Danny Mösch 7348cf0f4a Use SwiftSyntax 6.3 pre-release 2025-09-15 (#6206) 2025-09-29 14:59:47 +02:00
Danny Mösch aa67f5ac13 Adopt typed throws where possible (#5922) 2025-09-27 19:11:46 +02:00
Danny Mösch 0e2198d086 Exclude function types from async_without_await rule analysis (#6258) 2025-09-27 19:10:30 +02:00
Danny Mösch 74e6c3625f Ignore redundant_discardable_let in nested SwiftUI scopes (#6257) 2025-09-25 11:35:28 -04:00
Martin Redington 13c0c235eb only rule should work for individual custom rules (#6057) 2025-09-18 10:21:47 +01:00
Danny Mösch dcbdcc92d1 Ignore function, initializer and subscript declarations alike (#6242) 2025-09-07 11:53:32 +02:00
Danny Mösch 292343c31c Prepare 0.61.0 release 2025-09-06 14:09:41 +00:00
Danny Mösch 5e6e59f212 Rewrite quick_discouraged_call rule with SwiftSyntax (#6237) 2025-09-06 14:10:38 +02:00
Danny Mösch 54646f4424 Expose only TestHelpers and ExtraRulesTests as part of Bazel releases (#6235) 2025-09-05 17:30:12 +02:00
Danny Mösch 4859fa8e82 Ensure that headers matched against always end in a newline (#6234) 2025-09-04 23:09:35 +02:00
Danny Mösch b58b8401a0 Improve detection of comment-only lines in file_length rule (#6231) 2025-09-04 10:27:26 +02:00
Danny Mösch b97f63a89d Properly detect comment-only lines (#6230) 2025-09-03 23:42:04 +02:00
Danny Mösch 233908e28c Treat strings with opening and closing quotes in the same line as single-line strings (#6229) 2025-09-03 22:29:33 +02:00
Danny Mösch 6946309f9b Consider other expression types before function calls (#6226) 2025-09-03 14:33:10 +02:00
Danny Mösch 57d6752a2a Merge function_name_whitespace and operator_whitespace rules (#6217) 2025-09-03 00:34:22 +02:00
Rodion Ivashkov 91b26549c4 Add function_name_whitespace rule to validate and autocorrect spacing around function names (#6156)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2025-08-30 10:40:44 -04:00
Danny Mösch 77050e8c40 Enable a fully statically linked Linux executable (#6211)
If SwiftLint is built from this state using the Swift SDK, we'll get a
large self-contained Linux executable that runs without loading SourceKit.
It can do that by disabling any rule that requires SourceKit.

With `SWIFTLINT_DISABLE_SOURCEKIT` set on a normally (dynamically linked)
binary, the behavior is the same. That's different from the previously
reported more serious warnings.
2025-08-30 10:02:38 -04:00
Danny Mösch ba500d31a2 Remove unused code (#6208)
All the code has a relation to former SourceKit-based rules.
2025-08-30 14:09:07 +02:00
Danny Mösch 21942bd3cc Prepare 0.60.0 release 2025-08-30 11:27:51 +00:00
Danny Mösch 7624586c18 Maintain SourceKit-mode as long as custom rules don't support SwiftSyntax (#6212) 2025-08-30 09:42:52 +02:00
Danny Mösch 8ada387884 Ignore locally defined count identifiers in empty_count rule (#6202) 2025-08-24 14:08:40 -04:00
Danny Mösch 61507218f7 Exclude explicit system modules from duplicate_imports analysis (#6203) 2025-08-24 09:40:44 +02:00
Matt Thompson 2cfb4c2068 Apply private_swiftui_state rule to ViewModifier types (#6200) 2025-08-23 12:05:49 +02:00
André Pacheco Neves fe099492f2 Allow prefer_key_paths to ignore identity closures ({ $0 }) (#6068)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2025-08-15 00:30:10 +03:00
Leopold Lemmermann 2677d5ee6e Add new implicit_optional_initialization replacing redundant_optional_initialization (#6165)
The new rule covers both cases, initialization with `= nil` and without, consistently.

Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2025-08-13 10:08:49 +00:00
Copilot 90820fcda3 Extend xct_specific_matcher rule to cover === and !== (#6184)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2025-08-09 09:03:13 -04:00
Copilot 8cda6c66e9 Fix no_extension_access_modifier rule triggering on nonisolated modifier (#6174)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2025-08-04 13:12:37 -04:00
Copilot 8bb69b064a Add include_variables option to non_optional_string_data_conversion rule (#6172)
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2025-08-02 17:49:58 -04:00
Erik Kerber 69c9e29833 Add Sendable conformance to Rule.Type for building with Swift 6 (#6169) 2025-07-30 09:36:11 +02:00
Danny Mösch c1ffdfe891 Enable prefer_condition_list rule (#6163) 2025-07-12 09:41:00 -04:00
Danny Mösch cb214d51fa Add new prefer_condition_list rule (#6157) 2025-07-12 07:52:50 -04:00
Danny Mösch a321566c05 Support protocols and extensions in type body length checking (#6143) 2025-07-11 22:27:47 +02:00
Danny Mösch 092d0c3b62 Keep severity levels unchanged when no options are configured (#6160) 2025-07-11 04:18:28 -04:00
Danny Mösch 4efdcc7b25 Base visitors on rule configuration (#6159) 2025-07-10 18:13:06 -04:00