문제 설명
문서화 오류 Jazzy "0% 문서화되지 않은 기호가 포함된 문서 적용 범위" (documenting error Jazzy "0% documentation coverage with 0 undocumented symbols")
그래서 Jazzy를 실행하여 코드를 문서화하려고 시도하고 있지만 그다지 멀리 가지 못하고 있습니다.
이것은 swift(그리고 @ objc의 일부 기능)로 작성된 Xcode 프로젝트에서 Jazzy를 실행할 때 일어나는 일입니다. 어떤 식으로든 프로젝트를 준비해야 합니까? 이것에 대해 아무것도 찾을 수 없지만 Xcode와 재즈를 사용하는 것은 처음입니다. 명령을 실행하는 동안 내가 잘못하고 있는 것이 제대로 실행되지 않는 이유를 알려줄 수 있는 사람이 있습니까?
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`
jazzy ‑‑min‑acl을 시도했지만 이런 일이 발생했습니다.
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)
참조 솔루션
방법 1:
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
(by Petter Braka、Istafein)