Skip to content
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

swift-format Incorrectly duplicates comments to subsequent lines #843

Open
gvozdvmozgu opened this issue Oct 10, 2024 · 1 comment
Open

Comments

@gvozdvmozgu
Copy link

When formatting Swift code using swift-format, comments from one line are improperly duplicated to the following lines.

Steps to Reproduce:

  1. Create a Swift file (test.swift) with the following content:

    1 // test
    +1
  2. Run the following command to format the code:

    swift run swift-format test.swift
  3. Check the contents of test.swift after formatting:

    1  // test
    +1  // test
@ahoppen
Copy link
Member

ahoppen commented Oct 10, 2024

Synced to Apple’s issue tracker as rdar://137698840

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants