Commit Graph

2730 Commits

Author SHA1 Message Date
Cal Stephens 22a472ced4 Update for 0.59.1 release 0.59.1 2026-01-29 19:55:41 -08:00
Cal Stephens 788e1a84ba Update prepare_release.sh to run format.sh after updating binary 2026-01-29 19:53:51 -08:00
Cal Stephens 371139897b Fix handling of any keyword in sortTypealiases rule (#2348) 2026-01-29 19:53:51 -08:00
Cal Stephens c402af2674 Update spaceAroundBrackets to preserve space after global actor attribute before closure capture list (#2347) 2026-01-29 19:53:51 -08:00
Cal Stephens f5b4809d2c Update redundantMemberwiseInit to preserve inits with attributes (#2346) 2026-01-29 19:53:51 -08:00
Cal Stephens dc93e46b76 Revert recent #if indentation changes related to method chains (#2345) 2026-01-29 19:53:51 -08:00
Cal Stephens 8e36d27eb6 Update docComments rule to handle conditional compilation blocks in function bodies (#2343) 2026-01-29 19:53:51 -08:00
Cal Stephens 67058382b6 Update redundantMemberwiseInit to handle escaping closures (#2342) 2026-01-29 19:53:51 -08:00
Eric Horacek 3418719c55 Align #else/#elseif/#endif to matching #if in --ifdef no-indent (#2333) 2026-01-29 19:53:51 -08:00
Eric Horacek a23e20b579 Fix double-indent for if/switch assignments inside --ifdef no-indent (#2331) 2026-01-29 19:53:51 -08:00
Rui Chen 9e49c274fe Back-deploy range containment check
Replace macOS 13-only `ClosedRange.contains(_:)` overload for range
containment with a back-deployable check using lowerBound/upperBound
comparisons. This allows SwiftFormat to build without requiring
platforms: [.macOS(.v13)] in Package.swift.

Build tested:
- swift build --configuration release
- swift test --filter DeclarationTests (1 test passed)
2026-01-29 19:53:51 -08:00
Cal Stephens 53c804f5e8 Avoid conflict with format.sh by excluding Sources from regression tests 2026-01-29 19:53:51 -08:00
Cal Stephens 2fcc583d76 Use doc comments before local functions 2026-01-29 19:53:51 -08:00
Cal Stephens afefbcc091 Apply formatting 2026-01-25 09:28:33 -08:00
Cal Stephens c8b8d61f32 Update for 0.59.0 release 0.59.0 2026-01-25 09:02:04 -08:00
Cal Stephens 6d72a96404 Keep unusedPrivateDeclarations disabled by default (#2321) 2026-01-25 09:02:04 -08:00
David Roman f6de0521ea Fix --ifdef no-indent for method chains and nested directives (#2319) 2026-01-25 09:02:04 -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
Cal Stephens 32f61584d0 Update redundantSelf rule to support functions with no body (#2315) 2026-01-25 09:02:04 -08:00
Cal Stephens f914b48583 Update docComments rule to preserve formatting of comments with directives (#2314) 2026-01-25 09:02:04 -08:00
Lennon Wang 5b17fafbcf Correct the typo in the command line arguments of README.md (#2313) 2026-01-25 09:02:04 -08:00
Cal Stephens 983d77c954 Update organizeDeclarations rule to handle that private property wrapper variables with a default value don't affect memberwise initializer 2026-01-25 09:02:04 -08:00
Cal Stephens ded47995ae Fix issue where --prefer-synthesized-init-for-internal-structs option didn't handle properties with default values (#2311) 2026-01-25 09:02:04 -08:00
Andrei Zykov f848fae58b Add string escaping for XMLReporter (#2310) 2026-01-25 09:02:04 -08:00
Cal Stephens 4888e64821 Update redundantMemberwiseInit rule to support result builder attributes (#2304) 2026-01-25 09:02:04 -08:00
Cal Stephens c0558072ab Remove --optional-for-each convert option 2026-01-25 09:02:04 -08:00
Cal Stephens b7a8f49c26 Fix range crash in sortTypealiases rule 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 502ecc5aae Fix Linux release job 2026-01-25 09:02:04 -08:00
Cal Stephens 20512c8860 Update preferForLoop rule to support optional forEach calls with --optional-for-each convert (#2294) 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
Cal Stephens 98759dcbb5 Add CLAUDE.md (#2288) 2026-01-25 09:02:04 -08:00
Cal Stephens b755b34f69 Wrap closing paren of single-argument functions and collections if needed (#2281) 2026-01-25 09:02:04 -08:00
Nick Lockwood 7aaff1cab5 Enable noForceUnwrapInTests rule by default 2026-01-25 09:02:04 -08:00
Nick Lockwood 079939f88e Enable more rules by default 2026-01-25 09:02:04 -08:00
David Roman d3b707d7cc Add preserve ifdef indent mode (#2269) 2026-01-25 09:02:04 -08:00
Cal Stephens d02ba73bb5 Update typeSugar to only preserve optionals in structs with a synthesized memberwise initializer (#2260) 2026-01-25 09:02:04 -08:00
Manny Lopez de1b130b43 SimplifyGenericConstraints: Add 40 character limit to protocol composition (#2254) 2026-01-25 09:02:04 -08:00
Manny Lopez 2390292896 Update simplifyGenericConstraints rule to skip constraints with linebreaks within the protocol composition (#2251) 2026-01-25 09:02:04 -08:00
Cal Stephens b8984b48be Add validateTestCases and testSuiteAccessControl rules (#2249) 2026-01-25 09:02:04 -08:00
Manny Lopez e32f107656 Update SimplifyGenericConstraints for edge cases (#2246) 2026-01-25 09:02:04 -08:00
Manny Lopez 0a0ec17cf3 Add simplifyGenericConstraints rule (#2243) 2026-01-25 09:02:04 -08:00
Nick Lockwood bf498a9bf3 Fix various edge cases for spaceAroundBrackets 2026-01-25 09:02:04 -08:00
Nick Lockwood 25aaeea60e Fix space between paren and unsafe keyword 2026-01-25 09:02:03 -08:00
Nick Lockwood 251c4d8f7f Add isAttribute helpers 2026-01-25 09:02:03 -08:00
Nick Lockwood a246ebd9e5 Fix Windows release script 2026-01-25 09:02:03 -08:00
Nick Lockwood fdcf277230 Apply formatting 2026-01-25 09:02:03 -08:00