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

Make --skip-undocumented less aggressive #825

Merged
merged 6 commits into from
Jul 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
[JP Simard](https://github.com/jpsim)
[#824](https://github.com/realm/jazzy/issues/824)

* Stop --skip-undocumented from skipping documented items nested
inside extensions of types from other modules.
[John Fairhurst](https://github.com/johnfairh)
[#502](https://github.com/realm/jazzy/issues/502)

## 0.8.2

##### Breaking
Expand Down
8 changes: 2 additions & 6 deletions lib/jazzy/sourcekitten.rb
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,6 @@ def self.make_default_doc_info(declaration)
declaration.children = []
end

def self.documented_child?(doc)
return false unless doc['key.substructure']
doc['key.substructure'].any? { |child| documented_child?(child) }
end

def self.availability_attribute?(doc)
return false unless doc['key.attributes']
!doc['key.attributes'].select do |attribute|
Expand Down Expand Up @@ -282,13 +277,13 @@ def self.process_undocumented_token(doc, declaration)
objc = Config.instance.objc_mode
if objc || should_mark_undocumented(doc['key.kind'], filepath)
@stats.add_undocumented(declaration)
return nil if @skip_undocumented
declaration.abstract = @undocumented_abstract
else
comment = doc['key.doc.comment']
declaration.abstract = Markdown.render(comment) if comment
end

return nil if !documented_child?(doc) && @skip_undocumented
declaration
end

Expand Down Expand Up @@ -389,6 +384,7 @@ def self.make_source_declarations(docs, parent = nil)

next unless make_doc_info(doc, declaration)
make_substructure(doc, declaration)
next if declaration.type.extension? && declaration.children.empty?
declarations << declaration
end
declarations
Expand Down
3 changes: 3 additions & 0 deletions spec/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@
s.default_args = []
s.replace_path ROOT.to_s, 'ROOT'
s.replace_pattern /^[\d\s:.-]+ ruby\[\d+:\d+\] warning:.*$[\n]?/, ''
# Remove version numbers from CocoaPods dependencies
# to make specs resilient against dependecy updates.
s.replace_pattern /(Installing \w+ )\((.*)\)/, '\1(X.Y.Z)'
end

require 'shellwords'
Expand Down
2 changes: 1 addition & 1 deletion spec/integration_specs
Submodule integration_specs updated 97 files
+3 −0 document_alamofire/after/docs/Classes.html
+3 −0 document_alamofire/after/docs/Classes/DataRequest.html
+3 −0 document_alamofire/after/docs/Classes/DownloadRequest.html
+3 −0 document_alamofire/after/docs/Classes/DownloadRequest/DownloadOptions.html
+3 −0 document_alamofire/after/docs/Classes/MultipartFormData.html
+3 −0 document_alamofire/after/docs/Classes/NetworkReachabilityManager.html
+3 −0 document_alamofire/after/docs/Classes/Request.html
+3 −0 document_alamofire/after/docs/Classes/ServerTrustPolicyManager.html
+3 −0 document_alamofire/after/docs/Classes/SessionDelegate.html
+3 −0 document_alamofire/after/docs/Classes/SessionManager.html
+3 −0 document_alamofire/after/docs/Classes/TaskDelegate.html
+3 −0 document_alamofire/after/docs/Classes/UploadRequest.html
+3 −0 document_alamofire/after/docs/Enums.html
+3 −0 document_alamofire/after/docs/Enums/AFError.html
+3 −0 document_alamofire/after/docs/Enums/Result.html
+3 −0 document_alamofire/after/docs/Enums/ServerTrustPolicy.html
+26 −0 document_alamofire/after/docs/Extensions.html
+3 −0 document_alamofire/after/docs/Extensions/Notification.html
+3 −0 document_alamofire/after/docs/Extensions/Notification/Key.html
+3 −0 document_alamofire/after/docs/Extensions/Notification/Task.html
+3 −0 document_alamofire/after/docs/Extensions/String.html
+3 −0 document_alamofire/after/docs/Extensions/URL.html
+3 −0 document_alamofire/after/docs/Extensions/URLComponents.html
+405 −0 document_alamofire/after/docs/Extensions/URLRequest.html
+3 −0 document_alamofire/after/docs/Functions.html
+3 −0 document_alamofire/after/docs/Protocols.html
+3 −0 document_alamofire/after/docs/Protocols/DataResponseSerializerProtocol.html
+3 −0 document_alamofire/after/docs/Protocols/DownloadResponseSerializerProtocol.html
+3 −0 document_alamofire/after/docs/Protocols/ParameterEncoding.html
+3 −0 document_alamofire/after/docs/Protocols/RequestAdapter.html
+3 −0 document_alamofire/after/docs/Protocols/RequestRetrier.html
+3 −0 document_alamofire/after/docs/Protocols/URLConvertible.html
+3 −0 document_alamofire/after/docs/Protocols/URLRequestConvertible.html
+3 −0 document_alamofire/after/docs/Structs.html
+3 −0 document_alamofire/after/docs/Structs/DataResponse.html
+3 −0 document_alamofire/after/docs/Structs/DataResponseSerializer.html
+3 −0 document_alamofire/after/docs/Structs/DefaultDataResponse.html
+3 −0 document_alamofire/after/docs/Structs/DefaultDownloadResponse.html
+3 −0 document_alamofire/after/docs/Structs/DownloadResponse.html
+3 −0 document_alamofire/after/docs/Structs/DownloadResponseSerializer.html
+3 −0 document_alamofire/after/docs/Structs/JSONEncoding.html
+3 −0 document_alamofire/after/docs/Structs/PropertyListEncoding.html
+3 −0 document_alamofire/after/docs/Structs/Timeline.html
+3 −0 document_alamofire/after/docs/Structs/URLEncoding.html
+3 −0 document_alamofire/after/docs/Typealiases.html
+3 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes.html
+3 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/DataRequest.html
+3 −0 ...ent_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/DownloadRequest.html
+3 −0 ...ter/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/DownloadRequest/DownloadOptions.html
+3 −0 ...t_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/MultipartFormData.html
+3 −0 ...re/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/NetworkReachabilityManager.html
+3 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/Request.html
+3 −0 ...fire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/ServerTrustPolicyManager.html
+3 −0 ...ent_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/SessionDelegate.html
+3 −0 ...ment_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/SessionManager.html
+3 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/TaskDelegate.html
+3 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/UploadRequest.html
+3 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums.html
+3 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/AFError.html
+3 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/Result.html
+3 −0 ...ent_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/ServerTrustPolicy.html
+26 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions.html
+3 −0 ...ent_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/Notification.html
+3 −0 ...alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/Notification/Key.html
+3 −0 ...lamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/Notification/Task.html
+3 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/String.html
+3 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/URL.html
+3 −0 ...nt_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/URLComponents.html
+405 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/URLRequest.html
+3 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Functions.html
+3 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols.html
+3 −0 ...er/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/DataResponseSerializerProtocol.html
+3 −0 ...ocs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/DownloadResponseSerializerProtocol.html
+3 −0 ...alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/ParameterEncoding.html
+3 −0 ...nt_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/RequestAdapter.html
+3 −0 ...nt_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/RequestRetrier.html
+3 −0 ...nt_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/URLConvertible.html
+3 −0 ...ofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/URLRequestConvertible.html
+3 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs.html
+3 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DataResponse.html
+3 −0 ...mofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DataResponseSerializer.html
+3 −0 ...alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DefaultDataResponse.html
+3 −0 ...ofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DefaultDownloadResponse.html
+3 −0 ...nt_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DownloadResponse.html
+3 −0 ...re/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DownloadResponseSerializer.html
+3 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/JSONEncoding.html
+3 −0 ...lamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/PropertyListEncoding.html
+3 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/Timeline.html
+3 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/URLEncoding.html
+3 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Typealiases.html
+3 −0 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/index.html
+1 −1 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/search.json
+238 −235 document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/docSet.dsidx.csv
+3 −0 document_alamofire/after/docs/index.html
+1 −1 document_alamofire/after/docs/search.json
+2 −2 document_alamofire/after/execution_output.txt
+5 −5 document_moya_podspec/after/execution_output.txt