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

Documentation coverage incorrect, issues with subscripts #178

Closed
jessesquires opened this issue Mar 16, 2015 · 6 comments
Closed

Documentation coverage incorrect, issues with subscripts #178

jessesquires opened this issue Mar 16, 2015 · 6 comments
Assignees
Milestone

Comments

@jessesquires
Copy link
Contributor

Related to #63 and #69.

I have 100% coverage for JSQDataSourcesKit, but jazzy is reporting 89%.

If you look at the source, there are a few public subscripts that are not documented. However, when I attempt to add docs for these, jazzy reports 86%.


Subscripts:
I'm not sure how this may be improved, but I also wanted to mention it.

Currently, what jazzy generates for subscripts is a bit odd. It's hard to describe, so it would be best to look at an example. I'm using VVDocumenter to generate doc comments and what it generates makes sense (as in, I understand what it's attempting to do), but it treats subscripts like a normal function — thus, the odd docs/comments. Unfortunately, there's also no guidance from the Swift std lib on how to write docs for subscripts.

@jessesquires
Copy link
Contributor Author

Update:

I just completed docs for JSQCoreDataKit. It also has 100% coverage, but jazzy is reporting 91%.

This framework is much simpler than the one I sited previously in the original issue comment. It has fairly simple classes and structs, no subscripts or generics.


Both of these repos (JSQDataSourcesKit and JSQCoreDataKit) contain a build_docs.sh script. For testing/verifying this issue, you can run this after cloning either repo.

@jessesquires
Copy link
Contributor Author

Update:

Docs hosted by CocoaDocs report incorrect coverage.
My GitHub pages: JSQDataSourcesKit says 89%.
CocoaDocs: JSQDataSourcesKit says 29%.

@jpsim
Copy link
Collaborator

jpsim commented Mar 23, 2015

@jessesquires first of all, thanks for using jazzy in your projects and reporting these issues!

You bring up a few distinct problems in your comments.

1. CocoaDocs

CocoaDocs is running an outdated version of jazzy which considered private declarations in the documentation coverage statistics. I'll see if I can get that version updated.

2. Initializers with parameters are incorrectly detected as undocumented

I have 100% coverage for JSQDataSourcesKit, but jazzy is reporting 89%.

I created #183 to track this and have a pending fix in #184. Thanks for reporting it.

3. Subscripts

If you look at the source, there are a few public subscripts that are not documented. However, when I attempt to add docs for these, jazzy reports 86%.

Jazzy doesn't really support documenting subscripts just yet. This is being tracked in jpsim/SourceKitten#27.

@segiddins
Copy link
Collaborator

@jpsim CocoaDocs is running with Jazzy 0.1.2, and I'm pretty sure it has the minimum ACL set to public?

@jessesquires
Copy link
Contributor Author

@jpsim 👍 No problem! Thanks for the update/info and fixes! 😄

@jessesquires
Copy link
Contributor Author

Fixed in v0.1.4.

The following now correctly report 100% coverage. 🎉 🎉

Thanks for the hard work @jpsim and @segiddins !

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

4 participants