Skip to content

Commit

Permalink
Include declarations for undocumented symbols
Browse files Browse the repository at this point in the history
Always show the declaration if we know it.
If we don't have a declaration then make sure mustache
knows we don't want the one belonging to the parent.
  • Loading branch information
johnfairh committed Oct 20, 2017
1 parent 52bf33a commit 47f28dd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
[Jeremy David Giesbrecht](https://github.com/SDGGiesbrecht)
[#891](https://github.com/realm/jazzy/issues/891)

* Always display correct declaration for undocumented symbols.
[John Fairhurst](https://github.com/johnfairh)
[#864](https://github.com/realm/jazzy/issues/864)

## 0.8.4

##### Breaking
Expand Down
3 changes: 1 addition & 2 deletions lib/jazzy/doc_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def self.gh_token_url(item, source_module)
def self.render_item(item, source_module)
# Combine abstract and discussion into abstract
abstract = (item.abstract || '') + (item.discussion || '')
item_render = {
{
name: item.name,
abstract: abstract,
declaration: item.declaration,
Expand All @@ -323,7 +323,6 @@ def self.render_item(item, source_module)
start_line: item.start_line,
end_line: item.end_line,
}
item_render.reject { |_, v| v.nil? }
end

def self.make_task(mark, uid, items)
Expand Down
8 changes: 4 additions & 4 deletions lib/jazzy/sourcekitten.rb
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,6 @@ def self.parameters(doc, discovered)
def self.make_doc_info(doc, declaration)
return unless should_document?(doc)

unless doc['key.doc.full_as_xml']
return process_undocumented_token(doc, declaration)
end

declaration.declaration = Highlighter.highlight(
doc['key.parsed_declaration'] || doc['key.doc.declaration'],
Config.instance.objc_mode ? 'objc' : 'swift',
Expand All @@ -320,6 +316,10 @@ def self.make_doc_info(doc, declaration)
)
end

unless doc['key.doc.full_as_xml']
return process_undocumented_token(doc, declaration)
end

declaration.abstract = Markdown.render(doc['key.doc.comment'] || '')
declaration.discussion = ''
declaration.return = Markdown.rendered_returns
Expand Down
2 changes: 1 addition & 1 deletion spec/integration_specs
Submodule integration_specs updated 98 files
+3 −3 document_moya_podspec/after/docs/Classes/CancellableToken.html
+1 −1 document_moya_podspec/after/docs/Classes/CredentialsPlugin.html
+5 −5 document_moya_podspec/after/docs/Classes/Endpoint.html
+13 −13 document_moya_podspec/after/docs/Classes/MoyaProvider.html
+1 −1 document_moya_podspec/after/docs/Classes/NetworkActivityPlugin.html
+2 −2 document_moya_podspec/after/docs/Classes/NetworkLoggerPlugin.html
+4 −4 document_moya_podspec/after/docs/Classes/Response.html
+8 −0 document_moya_podspec/after/docs/Enums.html
+3 −3 document_moya_podspec/after/docs/Enums/AuthorizationType.html
+6 −0 document_moya_podspec/after/docs/Enums/MoyaError.html
+2 −2 document_moya_podspec/after/docs/Enums/MultiTarget.html
+2 −2 document_moya_podspec/after/docs/Enums/NetworkActivityChangeType.html
+1 −1 document_moya_podspec/after/docs/Extensions/Method.html
+3 −3 document_moya_podspec/after/docs/Extensions/SignalProducerProtocol.html
+9 −0 document_moya_podspec/after/docs/Functions.html
+8 −0 document_moya_podspec/after/docs/Protocols.html
+2 −2 document_moya_podspec/after/docs/Protocols/Cancellable.html
+14 −0 document_moya_podspec/after/docs/Protocols/MoyaProviderType.html
+1 −1 document_moya_podspec/after/docs/Protocols/TargetType.html
+8 −0 document_moya_podspec/after/docs/Structs.html
+3 −3 document_moya_podspec/after/docs/Structs/MultipartFormData/FormDataProvider.html
+46 −0 document_moya_podspec/after/docs/Structs/ProgressResponse.html
+3 −3 ...ment_moya_podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Classes/CancellableToken.html
+1 −1 ...ent_moya_podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Classes/CredentialsPlugin.html
+5 −5 document_moya_podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Classes/Endpoint.html
+13 −13 document_moya_podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Classes/MoyaProvider.html
+1 −1 ...moya_podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Classes/NetworkActivityPlugin.html
+2 −2 ...t_moya_podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Classes/NetworkLoggerPlugin.html
+4 −4 document_moya_podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Classes/Response.html
+8 −0 document_moya_podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Enums.html
+3 −3 document_moya_podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Enums/AuthorizationType.html
+6 −0 document_moya_podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Enums/MoyaError.html
+2 −2 document_moya_podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Enums/MultiTarget.html
+2 −2 ...ya_podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Enums/NetworkActivityChangeType.html
+1 −1 document_moya_podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Extensions/Method.html
+3 −3 ..._podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Extensions/SignalProducerProtocol.html
+9 −0 document_moya_podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Functions.html
+8 −0 document_moya_podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Protocols.html
+2 −2 document_moya_podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Protocols/Cancellable.html
+14 −0 ...nt_moya_podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Protocols/MoyaProviderType.html
+1 −1 document_moya_podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Protocols/TargetType.html
+8 −0 document_moya_podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Structs.html
+3 −3 ...after/docs/docsets/Moya.docset/Contents/Resources/Documents/Structs/MultipartFormData/FormDataProvider.html
+46 −0 ...ment_moya_podspec/after/docs/docsets/Moya.docset/Contents/Resources/Documents/Structs/ProgressResponse.html
+0 −8 document_realm_swift/after/docs/Classes/Object.html
+0 −8 document_realm_swift/after/docs/docsets/RealmSwift.docset/Contents/Resources/Documents/Classes/Object.html
+1 −1 document_siesta/after/api-docs/Structs/RequestError/Cause/InvalidTextEncoding.html
+1 −1 document_siesta/after/api-docs/Structs/RequestError/Cause/InvalidURL.html
+1 −1 document_siesta/after/api-docs/Structs/RequestError/Cause/JSONResponseIsNotDictionaryOrArray.html
+1 −1 document_siesta/after/api-docs/Structs/RequestError/Cause/NotURLEncodable.html
+1 −1 document_siesta/after/api-docs/Structs/RequestError/Cause/RequestCancelled.html
+1 −1 document_siesta/after/api-docs/Structs/RequestError/Cause/TransformerReturnedNil.html
+1 −1 document_siesta/after/api-docs/Structs/RequestError/Cause/UndecodableText.html
+2 −2 document_siesta/after/api-docs/Structs/RequestError/Cause/UnencodableText.html
+2 −2 document_siesta/after/api-docs/Structs/RequestError/Cause/WrongInputTypeInTranformerPipeline.html
+1 −1 ...docs/docsets/Siesta.docset/Contents/Resources/Documents/Structs/RequestError/Cause/InvalidTextEncoding.html
+1 −1 ...fter/api-docs/docsets/Siesta.docset/Contents/Resources/Documents/Structs/RequestError/Cause/InvalidURL.html
+1 −1 ...esta.docset/Contents/Resources/Documents/Structs/RequestError/Cause/JSONResponseIsNotDictionaryOrArray.html
+1 −1 ...api-docs/docsets/Siesta.docset/Contents/Resources/Documents/Structs/RequestError/Cause/NotURLEncodable.html
+1 −1 ...pi-docs/docsets/Siesta.docset/Contents/Resources/Documents/Structs/RequestError/Cause/RequestCancelled.html
+1 −1 ...s/docsets/Siesta.docset/Contents/Resources/Documents/Structs/RequestError/Cause/TransformerReturnedNil.html
+1 −1 ...api-docs/docsets/Siesta.docset/Contents/Resources/Documents/Structs/RequestError/Cause/UndecodableText.html
+2 −2 ...api-docs/docsets/Siesta.docset/Contents/Resources/Documents/Structs/RequestError/Cause/UnencodableText.html
+2 −2 ...esta.docset/Contents/Resources/Documents/Structs/RequestError/Cause/WrongInputTypeInTranformerPipeline.html
+1 −1 misc_jazzy_features/after/docs/Classes/ClassWithInitializers.html
+6 −0 misc_jazzy_features/after/docs/Classes/Operators.html
+38 −1 misc_jazzy_features/after/docs/Classes/TopLevelClass.html
+14 −0 misc_jazzy_features/after/docs/Classes/TopLevelClass/NestedLevel1.html
+6 −0 misc_jazzy_features/after/docs/Classes/TopLevelClass/NestedLevel1/NestedLevel2.html
+14 −0 misc_jazzy_features/after/docs/Enums/UndocumentedEnum.html
+1 −1 misc_jazzy_features/after/docs/Functions/_2F_28_5F_3A_5F_3A_29.html
+16 −0 misc_jazzy_features/after/docs/Other Classes.html
+8 −0 misc_jazzy_features/after/docs/Other Global Variables.html
+1 −1 misc_jazzy_features/after/docs/Structs/GenericStruct.html
+8 −0 misc_jazzy_features/after/docs/Yang.html
+1 −1 ...after/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/Documents/Classes/ClassWithInitializers.html
+6 −0 ...zy_features/after/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/Documents/Classes/Operators.html
+38 −1 ...eatures/after/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/Documents/Classes/TopLevelClass.html
+14 −0 .../docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/Documents/Classes/TopLevelClass/NestedLevel1.html
+6 −0 .../MiscJazzyFeatures.docset/Contents/Resources/Documents/Classes/TopLevelClass/NestedLevel1/NestedLevel2.html
+14 −0 ...atures/after/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/Documents/Enums/UndocumentedEnum.html
+1 −1 ...ter/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/Documents/Functions/_2F_28_5F_3A_5F_3A_29.html
+16 −0 ..._jazzy_features/after/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/Documents/Other Classes.html
+8 −0 ...atures/after/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/Documents/Other Global Variables.html
+1 −1 ...eatures/after/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/Documents/Structs/GenericStruct.html
+8 −0 misc_jazzy_features/after/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/Documents/Yang.html
+1 −1 misc_jazzy_features/after/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/Documents/search.json
+35 −33 misc_jazzy_features/after/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/docSet.dsidx.csv
+1 −1 misc_jazzy_features/after/docs/search.json
+1 −1 misc_jazzy_features/after/docs/undocumented.json
+2 −0 misc_jazzy_features/after/execution_output.txt
+8 −0 misc_jazzy_features/before/MiscJazzyFeatures/Classes.swift
+34 −0 misc_jazzy_objc_features/after/docs/Enums/SomeEnum.html
+21 −0 misc_jazzy_objc_features/after/docs/Other Constants.html
+12 −0 misc_jazzy_objc_features/after/docs/Other Enums.html
+34 −0 misc_jazzy_objc_features/after/docs/docsets/JazzyKit.docset/Contents/Resources/Documents/Enums/SomeEnum.html
+21 −0 misc_jazzy_objc_features/after/docs/docsets/JazzyKit.docset/Contents/Resources/Documents/Other Constants.html
+12 −0 misc_jazzy_objc_features/after/docs/docsets/JazzyKit.docset/Contents/Resources/Documents/Other Enums.html

0 comments on commit 47f28dd

Please sign in to comment.