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

[SR-5945] Regular comments prevent documentation comments from attaching #48504

Open
natecook1000 opened this issue Sep 20, 2017 · 2 comments
Open
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@natecook1000
Copy link
Member

Previous ID SR-5945
Radar None
Original Reporter @natecook1000
Type Bug
Environment

Xcode 9

Additional Detail from JIRA
Votes 0
Component/s Source Tooling
Labels Bug
Assignee None
Priority Medium

md5: df3dd78df2222ad48bff1aba811cdfb8

Issue Description:

SourceKit used to ignore any regular comments that came between a documentation comment and the symbol that it documents, but that appears to no longer the case. In this example, foo() gets a doc comment, but bar() doesn't:

/// Foos the thing.
func foo() {}

/// Bars the thing.
// FIXME: Doesn't actually bar anything.
func bar() {}
@belkadan
Copy link
Contributor

I was pretty sure this had deliberately never worked. (I argued for it, Dmitri argued against it, way back.) @nkcsgexi?

@johnfairh
Copy link
Contributor

I found a problem in this area and opened https://bugs.swift.org/browse/SR-6605 – looking at the code + blame, it looks like the "normal comment stops doc comment merging" rule has been there for a long time ("4 years") https://github.com/apple/swift/blame/6a9298cd36ce67d3543fb4c4529aafe126d6daa8/lib/AST/RawComment.cpp#L79

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

3 participants