nicklockwood / SwiftFormat

A command-line tool and Xcode Extension for formatting Swift code
MIT License
7.63k stars 623 forks source link

Add SwiftUI Property Wrapper declaration type #1747

Closed miguel-jimenez-0529 closed 4 days ago

miguel-jimenez-0529 commented 5 days ago

Add a new SwiftUI Property wrapper declaration type to allow sorting instance properties based on this new declaration type. For Example

 struct ContentView: View {
-    let foo: Foo
     @State let isOn: Bool
+    @State let quux: Quux
+    let foo: Foo
     let baaz: Baaz
-    @State let quux: Quux

     @ViewBuilder
     private var toggle: some View {
         Toggle(label, isOn: $isOn)
     }

     @ViewBuilder
     var body: some View {
         toggle
     }
 }
codecov[bot] commented 5 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.15%. Comparing base (15531fd) to head (f1e7295).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1747 +/- ## =========================================== - Coverage 95.18% 95.15% -0.04% =========================================== Files 20 20 Lines 23346 23382 +36 =========================================== + Hits 22221 22248 +27 - Misses 1125 1134 +9 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.