31 Commits

Author SHA1 Message Date
Copilot 1c99e0efcb Fix issue where trailing comma can't be added to closure return type in Swift 6.2 (#2387)
Co-authored-by: calda <1811727+calda@users.noreply.github.com>
2026-03-03 08:09:28 -08:00
Copilot 52e33850f9 Fix trailingCommas rule incorrectly adding commas to if #available checks (#2370)
Co-authored-by: calda <1811727+calda@users.noreply.github.com>
2026-03-03 08:09:27 -08:00
Nick Lockwood c6adf78f64 Fix trailing comma inserted into array type 2025-11-11 21:05:06 +00:00
Nick Lockwood 35455f3b69 Don't insert trailing commas inside #selector 2025-11-11 21:05:06 +00:00
Nick Lockwood a4679ce1e4 Fix trailingComma rule with typed throws 2025-10-16 07:16:56 +01:00
Cal Stephens cd09163b42 Handle Swift 6.2 bug where trailing commas are not allowed in closure literal tuple return types (#2213) 2025-09-22 19:13:36 -07:00
Cal Stephens b27e7c59e0 Handle bug where Swift 6.2 doesn't allow trailing commas in tuples within generic types 2025-09-22 19:13:36 -07:00
Cal Stephens 02e458209a Update trailingCommas rule to support bug fixes in Swift 6.2 2025-09-22 19:13:36 -07:00
Nick Lockwood 035ce340d4 Make trailingCommas removal more strict 2025-09-22 19:13:36 -07:00
Nick Lockwood b829018a8e Add additional trailingCommas tests 2025-09-22 19:13:36 -07:00
Cal Stephens cb97a7e224 Update trailingClosures and trailingCommas rules to support optional function calls (#2184) 2025-09-22 19:13:36 -07:00
Cal Stephens 8a13b97d62 Update trailingCommas rule to handle generic function declarations 2025-07-14 18:31:07 -07:00
Cal Stephens effd18860a Update --trailing-commas always to preserve trailing commas even when not known to be supported by Swift 6.1 2025-07-14 18:31:07 -07:00
Cal Stephens 7cfa7f7095 Fix issue where trailing commas were unexpectedly removed from initializer argument lists (#2135) 2025-07-14 06:46:09 -07:00
Cal Stephens 49bd6898c6 Add --trailing-commas multi-element-lists option (#2133) 2025-07-13 11:32:06 -07:00
Cal Stephens 3166fd00d6 Update options from --alloneword to --kebab-case (#2123) 2025-07-13 11:32:06 -07:00
Cameron Pulsford a65ea804ca Add --trailingcommas collections-only option to opt out of Swift 6.1 trailing comma support (#2081)
Co-authored-by: Cal Stephens <cal.stephens@airbnb.com>
2025-07-13 11:32:06 -07:00
Alex Agapov e53447306e Add missing code tag to Rules documentation (#2090)
Co-authored-by: Cal Stephens <cal@calstephens.tech>
2025-06-15 09:00:11 -07:00
Cal Stephens b1385186f6 Fix Swift 6.1 trailing comma support for closure / tuple typealiases (#2072) 2025-06-04 18:08:26 -07:00
Cal Stephens e48fc4334f Update trailingCommas to support @escaping / @Sendable closures, protocol primary associated types 2025-05-27 06:29:17 -07:00
Cal Stephens 728509134e Exclude extensions from trailing comma support in Swift 6.1 2025-05-13 19:56:49 -07:00
Cal Stephens 97f01f90f7 Allowlist known-supported cases of trailing closures in parens instead of requiring we handle all unsupported cases 2025-05-13 19:56:49 -07:00
Cal Stephens 5f65da1741 Update trailingCommas rule to handle edge cases where Swift 6.1 unexpectedly doesn't allow trailing commas in tuple or closure types (#2052) 2025-05-13 19:56:49 -07:00
Cal Stephens 66618320a8 Update trailingCommas rule to handle edge cases where Swift 6.1 unexpectedly doesn't allow trailing commas (#2047) 2025-05-13 19:56:49 -07:00
Cal Stephens e8ddbe4f36 Revert support for trailing commas in if / guard statements, which are not actually allowed in Swift 6.1 2025-05-12 20:18:43 -07:00
Cal Stephens b88aeefdac Update trailingCommas rule to support more case from SE-0439, including if statements, guard statements, subscripts, capture lists, generic arguments 2025-05-12 20:18:43 -07:00
Kiryl Famin 282f2bc1cb Add support for trailing commas in all cases containing parentheses in Swift 6.1 (#2008) 2025-05-12 20:18:43 -07:00
Kiryl Famin 35af50ed43 Add trailing commas for new cases in Swift 6.1 (#2002) 2025-05-12 20:18:43 -07:00
Cal Stephens c79878b86e Move rule examples below implementation closure (#1832) 2024-11-16 20:18:32 +00:00
Nick Lockwood 6beebcd21c Move examples into rules files 2024-11-16 20:13:32 +00:00
Cal Stephens 6ce3bd52c1 Implement each rule in a separate file (#1782) 2024-11-09 11:26:22 +00:00