-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"mark" rule autocorrection is eating preceding comment content #1749
Comments
I could reproduce it with 0.21.0. |
This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions! |
I can still reproduce this on latest master (0.41.0) with by adding this corrections example to Example("""
/*
func test1() {
}
↓//MARK: mark
func test2() {
}
*/
"""): Example("""
/*
func test1() {
}
↓// MARK: mark
func test2() {
}
*/
"""), |
This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions! |
I hope you don't mind that I've used your example in the PR 😄 |
Swiftlint 0.21.0
"mark" rule autocorrection work incorrectly for commented out code, it removes all preceding comment content including comment open mark.
It should handle this case properly or ignore commented out code instead
Example:
Output:
The text was updated successfully, but these errors were encountered: