Commit Graph

3000 Commits

Author SHA1 Message Date
Benjamin Kramer 0fe3404494 Add configuration only_enforce_before_trivial_lines to vertical_whitespace_closing_braces rule (#3941)
Vertical whitespace may be important for readability when the line
with the closing brace is not a trivial one (e.g. `} else if ... {`).
The configuration allows not enforcing the rule in such cases.
2022-09-29 20:26:51 +02:00
Marcelo Fabri a40488feaf Rewrite inert_defer rule with SwiftSyntax (#4242) 2022-09-28 19:57:00 -07:00
Danny Mösch c6eec8072c Move method (#4238) 2022-09-25 12:31:24 -04:00
Marcelo Fabri a4c46f624d Rewrite no_space_in_method_call with SwiftSyntax (#4236) 2022-09-25 02:55:00 -07:00
Marcelo Fabri 734eceada0 Rewrite empty_parentheses_with_trailing_closure with SwiftSyntax (#4235) 2022-09-25 02:54:29 -07:00
Danny Mösch 7be6f866fe Add new if_let_shadowing rule (#4206) 2022-09-22 19:27:45 +02:00
Martin Redington 0db26db975 Add test_parent_classes option to test_case_accessibility rule (#4214) 2022-09-21 18:29:32 +02:00
Marcelo Fabri f8a4276aba Rewrite generic_type_name rule with SwiftSyntax (#4229) 2022-09-21 08:29:52 -07:00
JP Simard 7b1de2f9cd Rewrite dynamic_inline with SwiftSyntax (#4218) 2022-09-20 20:07:24 +00:00
JP Simard 49665a9ec7 Rewrite fallthrough with SwiftSyntax (#4224) 2022-09-20 15:56:57 -04:00
Danny Mösch 0ea26edd4f Skip autocorrecting usage of NSIntersectionRect (#4213) 2022-09-20 07:09:05 +02:00
Danny Mösch 2efa085dd4 Make willMove a lifecycle method in type_contents_order rule (#4201) 2022-09-19 23:27:15 +02:00
dahlborn f3d367f667 Add LibraryContentProvider to file_types_order rule (#4209) 2022-09-19 22:15:41 +02:00
JP Simard 345a904055 Rewrite empty_enum_arguments with SwiftSyntax (#4221) 2022-09-19 20:12:21 +00:00
JP Simard 0808f2508b Fix typo in example (#4222) 2022-09-19 15:51:21 -04:00
JP Simard 8d500d1a63 Rewrite empty_collection_literal with SwiftSyntax (#4220) 2022-09-19 12:39:35 +02:00
JP Simard 992cc9afe3 Rewrite discouraged_object_literal with SwiftSyntax (#4219) 2022-09-19 10:24:22 +00:00
Danny Mösch 38e71f7a10 Enhance docs for type_name rule (#4197) 2022-09-10 10:54:13 -04:00
tillhainbach a9ec894caf Add exceptions to weak_delegate rule (#3599) 2022-09-10 10:07:43 -04:00
Chris Brakebill 9db303e3a3 Respect 'validates_start_with_lowercase' for function names in identifier_name rule (#4188) 2022-09-09 23:36:55 +02:00
JP Simard 4b1bb38fc3 Include the configured bind_identifier in self_binding violation (#4196)
As suggested in https://github.com/realm/SwiftLint/pull/4146#issuecomment-1241793057
2022-09-09 16:08:26 +00:00
Marcelo Fabri baf5647e2b Rewrite multiple_closures_with_trailing_closure with SwiftSyntax (#4193) 2022-09-08 19:34:06 +02:00
JP Simard 837f46479f Rewrite toggle_bool with SwiftSyntax (#4190) 2022-09-08 05:27:44 +00:00
JP Simard c6f3d0a6af Rewrite xctfail_message with SwiftSyntax (#4189) 2022-09-08 00:03:44 -04:00
Danny Mösch 311a724c3c Get rid of optional return value (#4187) 2022-09-07 18:18:34 -04:00
Danny Mösch 6b393b1b53 Re-delegate to ArrayInitRule (#4185) 2022-09-07 21:14:45 +00:00
JP Simard 4234664671 Rewrite anyobject_protocol with SwiftSyntax & deprecate (#4170) 2022-09-07 19:40:34 +00:00
JP Simard 8cd025112d Rewrite block_based_kvo with SwiftSyntax (#4171) 2022-09-07 15:16:22 -04:00
JP Simard efbe4d9f0f Rewrite discouraged_optional_boolean with SwiftSyntax (#4179) 2022-09-07 15:15:38 -04:00
JP Simard 4a239a695e Rewrite array_init rule with SwiftSyntax (#4175) 2022-09-07 15:15:10 -04:00
JP Simard bc7792ecd6 Rewrite empty_string with SwiftSyntax (#4177) 2022-09-07 13:59:15 -04:00
JP Simard 958cc20a9f Rewrite redundant_nil_coalescing with SwiftSyntax (#4182) 2022-09-07 13:29:06 -04:00
JP Simard 117ef7f0e2 Rewrite flatmap_over_map_reduce with SwiftSyntax (#4178) 2022-09-07 13:23:51 -04:00
JP Simard 0d03221281 Rewrite class_delegate_protocol with SwiftSyntax (#4172) 2022-09-07 12:20:47 -04:00
JP Simard 80c8e5d37a Rewrite closing_brace with SwiftSyntax (#4173) 2022-09-07 12:20:26 -04:00
JP Simard 9060d3f8e8 Rewrite force_try with SwiftSyntax (#4181) 2022-09-07 11:18:01 -04:00
JP Simard eb30be3826 Add SourceKitFreeRule conformance to FileNameNoSpaceRule (#4180) 2022-09-07 10:36:57 -04:00
JP Simard 2a8d536857 Remove delegation of TypesafeArrayInitRule to ArrayInitRule (#4174)
In preparation for rewriting `ArrayInitRule` with SwiftSyntax.
2022-09-07 01:34:58 -04:00
Ryan Cole c34955ca64 Add accessibility_trait_for_button rule (#3989) 2022-09-06 21:44:09 +00:00
Danny Mösch e459c4ae9b Exclude weak_delegate rule from autocorrection (#4153) 2022-09-06 22:56:51 +02:00
Marcelo Fabri e2900c4a7e Rewrite untyped_error_in_catch with SwiftSyntax (#4163) 2022-09-06 09:25:06 -07:00
Marcelo Fabri dd94d4ec53 Rewrite computed_accessors_order with SwiftSyntax (#4165) 2022-09-06 09:24:54 -07:00
Marcelo Fabri 1e7e0d6301 Remove references to ImplicitlyUnwrappedOptional type (#4166) 2022-09-06 09:01:22 -07:00
JP Simard 4b8a68072b Call super.visit in SyntaxRewriter overrides (#4167)
As discussed in https://github.com/realm/SwiftLint/pull/4159#discussion_r962841482
2022-09-06 13:52:40 +00:00
JP Simard 26465f21ce Add methods from SE-0348 to UnusedDeclarationRule (#4168)
https://github.com/apple/swift-evolution/blob/main/proposals/0348-buildpartialblock.md
2022-09-06 09:45:34 -04:00
Marcelo Fabri 622d48bd0a Convert unneeded_break_in_switch to SwiftSyntax (#4164) 2022-09-05 20:32:29 -07:00
Marcelo Fabri b9e6a9aed8 Rewrite unneeded_parentheses_in_closure_argument with SwiftSyntax (#4159) 2022-09-05 06:12:33 -04:00
Marcelo Fabri 6c0413077c Rewrite unowned_variable_capture with SwiftSyntax (#4161) 2022-09-05 05:38:29 -04:00
Marcelo Fabri 772e5f5806 Delegate Location init for AbsolutePosition to existing one (#4162) 2022-09-05 01:47:25 -04:00
Marcelo Fabri c7c4e0a1f3 Rewrite implicit_getter rule with SwiftSyntax (#4160)
* Rewrite `implicit_getter` rule with SwiftSyntax

* Handle different reason messages

* Add changelog + implicit return
2022-09-05 01:28:25 -04:00