-
Notifications
You must be signed in to change notification settings - Fork 413
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
Undocumented structures should show Swift declaration #141
Comments
The issue here seems to be that SoureKit won't return any documentation XML when the declaration is undocumented. (See https://github.com/Realm/jazzy/blob/master/lib/jazzy/sourcekitten.rb#L97). |
Uh. That's bad. But https://github.com/Realm/jazzy/blob/master/lib/jazzy/sourcekitten.rb#L96 (one line before) seems to access Or can the declaration documentation be directly created from the declaration info? The corresponding information should be their, shouldn't it? |
Anything on this? The "Undocumented"-text is unfortunately not very informative and the "Declaration" would be very helpful. |
I have not worked on this functionality lately, but you're of course welcome to do so. This part of jazzy's functionality is in SourceKitten. |
@jpsim: I would, but unfortunately I'm neither familiar with ruby, nor with the project itself (from the source code point-of-view). Especially, if it is not an easy one (missing information from SourceKit as @segiddins said), which needs some digging in. My first approach would perhaps be to add some whitespace fake-documentation to each undocumented declaration (or even the word "Undocumented") in transient a preprocessing step ... |
SourceKitten is actually 100% written in Swift. You can find the repo here: https://github.com/jpsim/SourceKitten |
Oh, cool. I'll look into it as soon as I can. Thanks. |
Interestingly if you have a documented class declaration and an undocumented member function, then the class declaration is shown as declaration for the member function, which is just erroneous: ///
class Something {
func doSomething() {
…
}
} The class documentation will render as:
and the member function declaration of
Adding an empty documentation explicitly will show the correct declaration, but will mess up documentation coverage: ///
class Something {
///
func doSomething() {
…
}
} |
From my understanding, this bug is related to SourceKit which is out of our hands. I've tagged the issue with blocked and I'm going to close the issue. Feel free to reopen if you disagree or have more to say about it. |
Not exactly out of our hands, just more work! |
Oh okay! Sweet, my apologies. |
Phew, great. Was a bit anxious, that that's it (especially as I had no time yet to look into it and it doesn't look better in the near future) |
Hi, I am not sure if there is already a fix on the way for this issue but I am using this fix on my copy of jazzy.
from
I just moved the check and handling of undocumented structure to come after adding its declaration. |
Fixed in master via #897. |
Thanks! |
Since #129 every undocumented structure has now a text "Undocumented" like here:
But if I add some really meaningless documentation I get much more information (the Swift declaration):
So why not use the declaration instead of the meaningless notion "Undocumented" (I would just omit it).
The text was updated successfully, but these errors were encountered: