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

Feature request: Reuse documentation comments for protocols on implementation. #971

Closed
galli-leo opened this issue May 11, 2018 · 1 comment

Comments

@galli-leo
Copy link

Not sure if this is doable, but when declaring a protocol that is used by many classes, it gets annoying having to copy paste most of the documentation. Thus I would propose an option, which uses the documentation of a function / property from the protocol itself, if no doc comment is on the actual implementation.

Example:

protocol MyProtocol {
  /// Does awesome stuff!
  func myAwesomeFunc()
}

extension String: MyProtocol {
  func myAwesomeFunc() {
    self = "awesome"
  }
}

Jazzy could then create the following documentation info on myAwesomeFunc() for String: "Does awesome stuff!"

@johnfairh
Copy link
Collaborator

This is oft-requested, tracked by #190. Implementation not entirely straight-forward which is why it hasn't been done yet!

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