Commit Graph

10 Commits

Author SHA1 Message Date
JP Simard 48604d35e3 Update Sourcery to 2.1.2 (#5318) 2023-10-31 20:34:49 +00:00
Danny Mösch 58928b7e40 Enforce any on existential types (#5273)
This makes syntactically clear which types are rather expensive.
2023-10-12 08:37:23 +02:00
Danny Mösch 9f927e9d9b Add new non_overridable_class_declaration rule (#5160) 2023-08-28 13:34:09 -04:00
Matt Thompson 0537f3af75 Add new private_swiftui_state_property rule (#4769) 2023-07-28 16:08:00 -04:00
Keith Smiley b3189aa2d7 Add unneeded_override rule (#5139)
This rule flags functions where the only thing they do is call their
super function and therefore could be omitted. For example:

```swift
override func foo() {
    super.foo()
}
```

This can get pretty complex since there are a lot of slight variations
the subclasses' functions can call the superclasses' functions with, but
this covers many of the cases. Ideally this would handle variable
overrides too but it doesn't currently.
2023-07-26 15:36:30 -04:00
Martin Redington 0693d547b0 Add new unneeded_synthesized_initializer rule (#4812) 2023-06-21 22:15:02 +02:00
woxtu f1d5a55658 Fix typo (#5044) 2023-06-10 23:50:49 +02:00
Kyle Bashour 8822d40687 Add unhandled_throwing_task rule (#4958)
This rule will check Task's that are not explicitly annotated with success and
failure types for unhandled try expressions. These trys will silently fail if an
error is thrown.

See this forum thread for more details:
https://forums.swift.org/t/task-initializer-with-throwing-closure-swallows-error/56066
2023-05-10 14:03:01 -04:00
Danny Mösch 6a2e973de3 Add new redundant_self_in_closure rule (#4911) 2023-05-05 21:14:14 +02:00
JP Simard a7bc9e20c7 Move built-in rules to new SwiftLintBuiltInRules module (#4950) 2023-04-27 11:16:01 -04:00