Closed r-plus closed 2 years ago
I am also able to reproduce this issue for a function call.
Sample code:
/**
Some comment.
Some explanation.
*/
SomeFunc(
SomeParam
)
Command run:
swiftformat test.swift --rules blockComments
Expected output:
/// Some comment.
///
/// Some explanation.
SomeFunc(
SomeParam
)
Actual output:
/// Some comment.
///
/// Some explanation.
///SomeFunc(
SomeParam
)
Thanks for reporting - I'll get it fixed asap.
@r-plus @meherkasam fixed in 0.49.2
Thanks for fixing this, @nicklockwood. Unfortunately, I'm still able to reproduce this issue for a comment in a slightly different format. Here's a simplified example:
/**
Line 1.
Line 2.
Line 3.
*/
SomeFunc(someParam)
Command to run:
swiftformat test.swift --rules blockComments
Expected:
/// Line 1.
///
/// Line 2.
///
/// Line 3.
SomeFunc(someParam)
Actual:
/// Line 1.
///
/// Line 2.
///
/// Line 3.
///SomeFunc(someParam)
@meherkasam d'oh! OK, I'll try again.
@meherkasam fixed in 0.49.3
When document comment have blank line,
blockComments
rule will comment out method defined line.before format
after format
SwiftFormat version: 0.49.1 macOS 11.6