-
Notifications
You must be signed in to change notification settings - Fork 669
Open
Labels
fixed in developbug/feature resolved in the develop branchbug/feature resolved in the develop branch
Description
Summary
When running SwiftFormat 0.58.7 with the docComments rule enabled, many /// doc comments are converted into // line comments. This breaks DocC/public symbol documentation.
Environment
- SwiftFormat version: 0.58.7
- Swift version: 5.7 (configured)
- Command:
swiftformat . --config .config/.swiftformat
Config
Relevant excerpt from .swiftformat:
--disable all
--enable ...
--enable docComments
--header strip
(full config available if needed)
Reproduction
- Create a Swift file like this:
/// Protocol for providing authentication challenges.
public protocol ChallengeProvider {
func refreshChallenge()
}- Run SwiftFormat 0.58.7 with the docComments rule enabled.
Actual result
The /// comment becomes:
// Protocol for providing authentication challenges.
public protocol ChallengeProvider {
func refreshChallenge()
}Expected result
/// doc comments should be preserved (or at least not downgraded to //).
Notes
This happens across multiple files in our codebase once the rule is enabled. We’ve disabled the rule temporarily as a workaround.
oliviertavel and nstefan
Metadata
Metadata
Assignees
Labels
fixed in developbug/feature resolved in the develop branchbug/feature resolved in the develop branch