nicklockwood / SwiftFormat

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

docComments don't work for code inside #if #1528

Closed dungi closed 10 months ago

dungi commented 11 months ago

Hey,

since the last update you fixed docComments inside if statements. Sadly this also affects codes inside #if blocks

like

#if DEBUG

/// return 3
func returnNumber() {
  return 3
}

#endif

Will be converted to

#if DEBUG

// return 3
func returnNumber() {
  return 3
}

#endif
nicklockwood commented 11 months ago

Thanks for flagging this, I'll get it fixed.

nicklockwood commented 10 months ago

@dungi fixed in 0.52.5