37 Commits
Author SHA1 Message Date
Eric Horacek cc6688c1c4 Parse freestanding macro declarations (#2532) 2026-05-13 07:09:20 +09:00
Copilotandcalda 835f6f287d Fix infinite loop in organizeDeclarations when opening brace has a trailing comment (#2478)
Co-authored-by: calda <1811727+calda@users.noreply.github.com>
2026-04-11 12:26:55 -07:00
Copilotandcalda 39bdad4ac3 Update blankLinesAroundMark to insert blank line before MARK at start of scope when allowed by blankLinesAtStartOfScope config (#2405)
Co-authored-by: calda <1811727+calda@users.noreply.github.com>
2026-03-03 08:09:28 -08:00
Cal Stephens a3e885c0a3 Update organizeDeclarations to sort members that don't affect a struct's synthesized memberwise init (#2318) 2026-01-25 09:02:04 -08:00
Cal Stephens 7b98567ab9 Update organizeDeclarations to handle that optional properties have an implicit default value (#2317) 2026-01-25 09:02:04 -08:00
Manny Lopez 3d4dc98a01 Split wrapSingleLineBodies into wrapPropertyBodies and wrapFunctionBodies (#2298) 2026-01-25 09:02:04 -08:00
Miguel Jimenez b993e17594 Add redundantViewBuilder Rule (#2297) 2026-01-25 09:02:04 -08:00
Manny Lopez 688ff0cae6 Add wrapSingleLineBodies rule (#2295) 2026-01-25 09:02:04 -08:00
Cal Stephens 8917aa0313 Add --prefer-synthesized-init-for-internal-structs option (#2291) 2026-01-25 09:02:04 -08:00
Nick Lockwood 6ea6ae64c7 Add new rules to project .swiftformat file 2025-10-04 08:46:46 +01:00
Cal Stephens 51b6027154 Fix parseDeclarations parsing bug (#2214) 2025-09-22 19:13:36 -07:00
Cal Stephens fe0dd073ec Update singlePropertyPerLine to preserve async let declarations (#2210) 2025-09-22 19:13:36 -07:00
Cal Stephens 179fcae759 Fix bug where --type-body-marks remove wouldn't be respected on declarations with expected mark comment (#2200) 2025-09-22 19:13:36 -07:00
Cal Stephens 5b343adc26 Add --type-body-marks remove option to organizeDeclarations (#2175) 2025-09-22 19:13:36 -07:00
Cal Stephens 5bfbb67f6f Update rule tests to use multi-line strings (#2168) 2025-09-22 19:13:35 -07:00
Cal Stephens d4a15aff9f Add organizeDeclarations threshold options to organize types without adding marks (#2162) 2025-09-22 19:13:35 -07:00
Cal Stephens 56312dc423 Don't add access control marks in protocol bodies (#2159) 2025-09-22 19:13:35 -07:00
Cal Stephens b1a5c1ffa9 Update organizeDeclarations to treat associatedtype declarations as nested types, like typealias declarations. (#2158) 2025-09-22 19:13:35 -07:00
Cal Stephens 5da12fe448 Add @Bindable to list of SwiftUI property wrappers (#2140) 2025-07-14 06:46:09 -07:00
Cal Stephens d07ba4e6a7 Update redundantPublic rule to handle extensions of internal types (#2077) 2025-07-13 11:32:06 -07:00
Cal Stephens 760c32756c Add rule to remove redundant public access control from declarations in internal types (#2075) 2025-07-13 11:32:06 -07:00
Cal Stephens 4f8365dcab Update organizeDeclarations / parseDeclarations to support property declarations with if expression values (#2046) 2025-05-13 19:56:49 -07:00
Cal Stephens fe51e1e568 Fix issue where type under organizeDeclarations line count threshold would ignore swiftformat:sort directive (#1976) 2025-05-12 20:18:43 -07:00
Cal Stephens 54be59fd59 Fix crash in organizeDeclarations rule due to invalidated declaration references (#1971) 2025-05-12 20:18:43 -07:00
Cal Stephens d500f12ffa Fix issue where organizeDeclarations rule would unexpectedly remove non-mark comment (#1956) 2025-05-12 20:18:43 -07:00
Cal Stephens 217aa55dab Migrate organizeDeclarations rule to DeclarationV2 2025-05-12 20:18:43 -07:00
Dave Paul 46b3afc372 Add new rule to ensure @State properties are private 2025-05-12 20:18:42 -07:00
Miguel Jimenez 10336e6530 Add option to sort SwiftUI properties by the first property appearance (#1821) 2025-05-12 20:18:42 -07:00
Miguel Jimenez 0237ffb70f Add SwiftUI properties subcategory alphabetical sort (#1794) 2025-05-12 20:18:42 -07:00
Cal Stephens 2eacc27ae4 Update organizeDeclarations type mode to not treat properties with didSet as computed properties (#1952) 2025-01-20 00:14:58 +00:00
Nick Lockwood 4a57064842 Update docCommentsBeforeAttributes to apply to all modifiers 2024-11-16 20:23:01 +00:00
Nick Lockwood add0c34108 Rename propertyType rule to propertyTypes 2024-11-16 20:23:01 +00:00
Cal Stephens f452a61fba Fix issue where --beforemarks unexpectedly checked function bodies for matching keywords (#1914) 2024-11-16 20:12:07 +00:00
Cal Stephens 00e219d662 Fix missing lint output for organizeDeclarations rule (#1826) 2024-11-16 20:11:16 +00:00
Miguel Jimenez fb3b551dfe Ensure SwiftUI property reorder doesn't affect synthesized init (#1796) 2024-11-09 11:26:29 +00:00
Cal Stephens 97169a8682 Update organizeDeclarations to avoid inserting blank lines inside consecutive groups of properties (#1795) 2024-11-09 11:26:29 +00:00
Cal Stephens 6ce3bd52c1 Implement each rule in a separate file (#1782) 2024-11-09 11:26:22 +00:00