github nicklockwood/SwiftFormat 0.55.0

2 hours ago
  • Added docCommentsBeforeModifiers rule to hoist doc comments above declaration modifiers
  • Added unusedPrivateDeclarations rule to remove unused private or fileprivate declarations
  • Added propertyTypes rule to control the use of inferred or explicit types for properties
  • Renamed the --redundanttype option to --propertytypes as it's shared by both rules
  • Added --ranges preserve and --operatorfunc preserve options
  • Added --languagemode option to specify if you are using Swift 5 or 6 language mode
  • The organizeDeclarations rule can now sort declarations by name/type/visibility/etc
  • Fixed organizeDeclarations bug where --beforemarks unexpectedly matched keywords in function bodies
  • Fixed missing lint output for organizeDeclarations rule
  • Fixed bug in markTypes rule for chained protocol extension names
  • Renamed the confusing --onelineforeach option to --inlinedforeach
  • Git info can now be used in header comments when formatting code from stdin
  • You can now use the --outputtokens option to print output as tokens in JSON format
  • Each rule and test is now defined in a separate file to make it easier to maintain/contribute
  • Updated minimum Swift version for building SwiftFormat to 5.3 (you can still format older Swift code)
  • Docker build now uses static Linux SDK

Don't miss a new SwiftFormat release

NewReleases is sending notifications on new releases.