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

Include documentation for properties and functions from protocol extensions #21

Open
erichoracek opened this issue Jul 25, 2019 · 1 comment

Comments

@erichoracek
Copy link

In both Apple docs & Jazzy docs, functions and properties that are added to a type via protocol extensions are included in the documentation for any type that conforms to that protocol. For example, the following:

protocol P {}
extension P {
  /// This is a function added to all Ps in a protocol extension.
  func extension() {}
}
struct S: P {}

Will result in the documentation for S including func extension(). Would this be possible with SourceDocs?

@eneko
Copy link
Collaborator

eneko commented Jul 25, 2019

Hi @erichoracek, thanks for bringing this up.

I haven't looked into it, but a priori I seems like it should be possible (both Jazzy and SourceDocs extract documentation from source code using SourceKitten).

It might take some cross-referencing, and/or manually including those methods and properties in the conforming type. But should be doable.

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

No branches or pull requests

2 participants