Petter Braka
Petter Braka

Reputation: 349

documenting error Jazzy "0% documentation coverage with 0 undocumented symbols"

So I'm trying to run Jazzy to document my code but I'm not getting very far.

This is what happens when i run Jazzy on my Xcode project written in swift(and some functions in @ objc). Do i need to prepare the project in any way? I can't find anything about this, but it's my first time using Xcode and jazzy. Can anyone tell me why it's not able to run properly am i doing something wrong while running the command?

jazzy 
Running xcodebuild
Checking xcodebuild -showBuildSettings
Assuming New Build System is used.
Parsing AppDelegate.swift (1/4)
Parsing Card.swift (2/4)
Parsing SceneDelegate.swift (3/4)
Parsing ViewController.swift (4/4)
0% documentation coverage with 0 undocumented symbols
skipped 4 private, fileprivate, or internal symbols (use `--min-acl` to specify a different minimum ACL)
building site
building search index
jam out ♪♫ to your fresh new docs in `docs`

I tried doing jazzy --min-acl but this happens:

jazzy --min-acl
Traceback (most recent call last):
15: from /usr/local/bin/jazzy:23:in `<main>'
14: from /usr/local/bin/jazzy:23:in `load'
13: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.2/bin/jazzy:15:in `<top (required)>'
12: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.2/lib/jazzy/config.rb:442:in `parse!'
11: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.2/lib/jazzy/config.rb:485:in   `parse_command_line'
10: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/optparse.rb:1678:in `parse!'
 9: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/optparse.rb:1656:in `permute!'
 8: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/optparse.rb:1562:in `order!'
 7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/optparse.rb:1568:in `parse_in_order'
 6: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/optparse.rb:1568:in `catch'
 5: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/optparse.rb:1582:in `block in parse_in_order'
 4: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.2/lib/jazzy/config.rb:54:in `block in attach_to_option_parser'
 3: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.2/lib/jazzy/config.rb:35:in `set'
 2: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.2/lib/jazzy/config.rb:35:in `instance_exec'
 1: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.2/lib/jazzy/config.rb:342:in `block in <class:Config>'
 /Library/Ruby/Gems/2.6.0/gems/jazzy-0.13.2/lib/jazzy/source_declaration/access_control_level.rb:64:in `from_human_string': cannot initialize AccessControlLevel with '' (RuntimeError)

Upvotes: 1

Views: 636

Answers (1)

Istafein
Istafein

Reputation: 110

For the sake of people searching on google, when jazzy reports skipped items and generates 0% of documentation, invoke jazzy in the following way:

jazzy --min-acl <internal|fileprivate|private>

Swift is internal unless you specify the access otherwise.

Here is a link to the github readme discussing this topic: https://github.com/realm/jazzy#controlling-what-is-documented

Upvotes: 0

Related Questions