nicklockwood / SwiftFormat

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

Internal keyword is dropped on access-level imports (AccessLevelOnImport feature) #1618

Closed mr-swifter closed 5 months ago

mr-swifter commented 5 months ago

Access-level modifiers on import declarations feature has been added to Swift 5.9. See reference. It's under experimental flag now, but can be used.

This feature allows, in particular, do internal imports:

internal import MyPackage

It seems this internal keyword falls under redundantInternal rule and removed when I apply swiftformat, but in reality it now has absolutely different meaning and can't be consider just as redundant internal.

nicklockwood commented 5 months ago

@mr-swifter fixed in 0.53.1