JP Simard
70a56a1420
Update SwiftSyntax to 04-10 snapshot ( #4887 )
...
https://github.com/apple/swift-syntax/releases/tag/509.0.0-swift-5.9-DEVELOPMENT-SNAPSHOT-2023-04-10-a
2023-04-13 14:04:43 -04:00
Danny Mösch
c9b1b961f5
Fix some issues in `direct_return` rule ( #4783 )
2023-02-25 02:48:31 -05:00
JP Simard
2f0e537f9b
Update SwiftSyntax to latest development snapshot ( #4759 )
...
* Merge `spacedBinaryOperator` and `unspacedBinaryOperator`
* New contextual keyword enums
* Update for removed `UnavailabilityConditionSyntax`
* Handle how attributes are now defined
This partially reverts commit 325d0ee1e4
.
* Handle removal of `TokenListSyntax`
* Update `Package.swift`
* Extract some SwiftSyntax helpers
* Update to `0.50900.0-swift-DEVELOPMENT-SNAPSHOT-2023-02-06-a`
* Skip attributes with keypath arguments in `attributes` rule
To preserve the rule's existing behavior.
* Limit unowned_variable_capture violations to capture lists
* Add changelog entries
2023-02-20 10:51:31 -05:00
Danny Mösch
f3e5557de9
Stop triggering `strict_fileprivate` rule on protocol implementations ( #4705 )
2023-02-18 13:23:26 +01:00
Danny Mösch
5eed8fe91b
Enable `if_let_shadowing` rule and fix all violations ( #4247 )
2023-01-31 22:31:38 +01:00
JP Simard
0750d5d465
Extract `EnumDeclSyntax.supportsRawValues` helper ( #4727 )
...
I'll want to use this elsewhere shortly.
Also adds `CGFloat` to the raw value types since we were missing that
one.
2023-01-27 16:46:54 -05:00
Martin Redington
7a8b2d1dab
Add `test_parent_class` option to more test rules ( #4262 )
2022-12-01 18:56:13 +01: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