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

Column limits don't seem to apply to comments #469

Open
dabrahams opened this issue Jan 9, 2023 · 4 comments · May be fixed by #738
Open

Column limits don't seem to apply to comments #469

dabrahams opened this issue Jan 9, 2023 · 4 comments · May be fixed by #738
Labels
bug Something isn't working

Comments

@dabrahams
Copy link
Contributor

Description

I want column limits respected even in comments, and I want them to be automatically line-wrapped, preserving markdown semantics within doc comments.

Steps to Reproduce

Run swift-format lint on:

// 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789

It should complain, but does not.

@dabrahams dabrahams added the bug Something isn't working label Jan 9, 2023
@allevato
Copy link
Collaborator

allevato commented Jan 9, 2023

Did you mean to file this over at apple/swift-format?

The current behavior is WAI, but I'd like to make improvements here. Treating comments as Markdown resolves the majority of my concerns around formatting comments (a long URL? Markdown will still preserve it past the line limit. Some fancy ASCII art diagram? Wrap it in triple-backticks to preserve it), but we'll need semver releases over at https://github.com/apple/swift-markdown before we can adopt it.

@dabrahams
Copy link
Contributor Author

dabrahams commented Jan 9, 2023

Did you mean to file this over at apple/swift-format?

Uh, yeah. Can it be moved? Should I refile?

WAI

?

@allevato allevato transferred this issue from apple/swift-syntax Jan 10, 2023
@allevato
Copy link
Collaborator

Did you mean to file this over at apple/swift-format?

Uh, yeah. Can it be moved? Should I refile?

I've transferred it over.

WAI

?

Working as intended (under the constraints today, which is that I don't want us to implement our own line-breaking logic for prose, and using swift-markdown would fix that).

@ahoppen
Copy link
Contributor

ahoppen commented Apr 23, 2024

Tracked in Apple’s issue tracker as rdar://126948257

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants