Commit Graph

13 Commits

Author SHA1 Message Date
Marcelo Fabri f81e28c574 Rewrite `explicit_acl` rule with SwiftSyntax 2022-11-06 20:25:34 -08:00
Danny Mösch 1edef5ebdc
Trigger `prefer_self_in_static_references` rule on constructor calls (#4519) 2022-11-06 14:55:28 +01:00
Danny Mösch 7e8a3ae2ac
Introduce `onlyElement` property on `Collection` (#4518) 2022-11-06 07:37:44 -05:00
Marcelo Fabri 45ac3dcdff
Rewrite `required_enum_case` with SwiftSyntax (#4521) 2022-11-06 01:26:11 -08:00
JP Simard f1f6a3c4a0
Add `ByteSourceRange.toSourceKittenByteRange()` helper (#4500)
This will be useful for other rules too.
2022-11-01 14:13:29 -04:00
Marcelo Fabri 20bfe264f5
Rewrite `overridden_super_call` and `prohibited_super_call` with SwiftSyntax (#4493)
* Rewrite `overridden_super_call` with SwiftSyntax

* Rewrite `prohibited_super_call` too
2022-10-30 20:28:25 -07:00
Marcelo Fabri c1f2b615e2
Rewrite `redundant_optional_initialization` with SwiftSyntax (#4409) 2022-10-23 20:30:29 -04:00
Marcelo Fabri cee4af098f
Migrate `prefer_zero_over_explicit_init` to SwiftSyntax (#4448) 2022-10-23 04:53:00 -07:00
Marcelo Fabri 9c8708bc01
Extract common SwiftSyntax extensions (#4445) 2022-10-23 00:54:18 -07:00
Marcelo Fabri 04d7ce05ca
Rewrite `joined_default_parameter` with SwiftSyntax (#4411) 2022-10-18 20:12:56 -07:00
JP Simard 48fde2321f
Rewrite `contains_over_first_not_nil` & `last_where` with SwiftSyntax (#4366)
Replace `MemberAccessExprSyntax.functionCallBase` with
`ExprSyntax.asFunctionCall` so we can use it in more places.

Move `TokenKind.isEqualityComparison` into `SwiftSyntax+SwiftLint.swift`
2022-10-13 15:59:30 +00:00
JP Simard 8d29b21ecb
Rewrite `sorted_first_last` & `first_where` with SwiftSyntax (#4365)
Add a `functionCallBase` helper.
2022-10-13 15:30:22 +00:00
JP Simard 9aaeff67d0
Add `SyntaxProtocol.isContainedIn(regions:locationConverter:)` helper (#4356) 2022-10-12 19:50:32 +00:00