-
Notifications
You must be signed in to change notification settings - Fork 146
Enable parameter and return value validation by default #882
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
Enable parameter and return value validation by default #882
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing how many inconsistencies this feature found in the DocC docs 👍
/// Begins the given metric. | ||
/// - Parameters: | ||
/// - metric: The metric to begin measuring. | ||
/// - log: The log that may filter out the metric. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a Returns:
doc comment for this function also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal of this PR isn't to extensively document all the parameters and return values, only to fix the warnings about mis-documented parameters or return values.
@@ -104,7 +104,6 @@ public struct CoverageDataEntry: CustomStringConvertible, Codable { | |||
} | |||
|
|||
/// Outputs a short table summarizing the coverage statistics for a list of data entries. | |||
/// - Parameter coverageInfo: An array of entries to summarize. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it's an experimental API that result in warnings about not having all of its parameters documented.
- ``defaultCodeListingLanguage`` | ||
- ``defaultAvailability`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why removing these symbols from here? There are also part of the Documentation Bundle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are not. These links don't resolve to anything.
Sources/docc/DocCDocumentation.docc/documenting-api-with-different-language-representations.md
Show resolved
Hide resolved
Sources/docc/DocCDocumentation.docc/documenting-api-with-different-language-representations.md
Outdated
Show resolved
Hide resolved
rdar://125835874
@swift-ci please test |
@swift-ci please test |
* Enable parameter and return value validation by default rdar://125835874 * Remove various links to symbols that no longer exist * Fix warnings about undocumented parameters * Add article about documenting multi-source-language APIs * Fix additional warnings about undocumented parameters * Refine the synthesized content phrasing for ObjC API with errors rdar://125835874 * Clarify documentation about documenting return values. * Update example error documentation * Rename feature flag to remove "experimental" * Remove redundant test setup * Fix test that documented parameters that the symbol didn't have * Fix test that was expecting the wrong number of diagnostics * Add license comment to new documentation article
* Enable parameter and return value validation by default rdar://125835874 * Remove various links to symbols that no longer exist * Fix warnings about undocumented parameters * Add article about documenting multi-source-language APIs * Fix additional warnings about undocumented parameters * Refine the synthesized content phrasing for ObjC API with errors rdar://125835874 * Clarify documentation about documenting return values. * Update example error documentation * Rename feature flag to remove "experimental" * Remove redundant test setup * Fix test that documented parameters that the symbol didn't have * Fix test that was expecting the wrong number of diagnostics * Add license comment to new documentation article
Bug/issue #, if applicable: rdar://125835874
Summary
This enables DocC's processing and validation of parameter and return value documentation by default.
It also uses this flag to fix the new warnings in DocC about incorrectly documented parameters or return values.
Lastly, it adds an article that describe the basics of documenting multi-source-language API and describe the new parameter and return value behaviors.
Dependencies
None.
Testing
The steps described in #776 now apply by default.
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
./bin/test
script and it succeeded