Skip to content

Conversation

@d-ronnqvist
Copy link
Contributor

  • Explanation: This enabled DocC's new parameter and return value validation by default and fixes the warnings in the DocC code that are raised by this feature.
  • Scope: Diagnostics for incorrect parameter and return value documentation. Better handling of parameters and return values that only exist in one language representation of a symbol.
  • Issue: rdar://125835874
  • Risk: Low.
  • Testing: Existing automated tests pass. Manually used the feature on DocC's code to find a large number of mis-documented parameters.
  • Reviewer: @patshaughnessy
  • Original PR: Enable parameter and return value validation by default  #882

* 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
@d-ronnqvist d-ronnqvist requested a review from franklinsch April 24, 2024 16:36
@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

@d-ronnqvist d-ronnqvist requested a review from Teapane April 24, 2024 16:38
@d-ronnqvist d-ronnqvist merged commit e6c5b94 into swiftlang:release/6.0 Apr 25, 2024
@d-ronnqvist d-ronnqvist deleted the validate-parameter-docs-by-default-6.0 branch April 25, 2024 14:09
QuietMisdreavus added a commit to QuietMisdreavus/swift-docc that referenced this pull request May 31, 2024
this fixes an issue when tests are run sequentially;
testParameterValidationFeatureFlag (added in swiftlang#897) can fail if run after
testOptionsValidation, because it sets `DOCC_HTML_DIR` to a temporary
directory, which is deleted after the test exits. by resetting the
environment variable in a defer block, we can restore a proper
environment for later tests.
QuietMisdreavus added a commit to QuietMisdreavus/swift-docc that referenced this pull request May 31, 2024
this fixes an issue when tests are run sequentially;
testParameterValidationFeatureFlag (added in swiftlang#897) can fail if run after
testOptionsValidation, because it sets `DOCC_HTML_DIR` to a temporary
directory, which is deleted after the test exits. by resetting the
environment variable in a defer block, we can restore a proper
environment for later tests.
QuietMisdreavus added a commit that referenced this pull request Jun 4, 2024
* unset template environment after testOptionsValidation exits

this fixes an issue when tests are run sequentially;
testParameterValidationFeatureFlag (added in #897) can fail if run after
testOptionsValidation, because it sets `DOCC_HTML_DIR` to a temporary
directory, which is deleted after the test exits. by resetting the
environment variable in a defer block, we can restore a proper
environment for later tests.

* reset the environment for all ConvertSubcommandTests

* set pwd to a temporary directory

this ensures that the tests aren't affected by the machine environment,
for example if a gitignore'd path contains a symlink
QuietMisdreavus added a commit to QuietMisdreavus/swift-docc that referenced this pull request Jul 16, 2024
* unset template environment after testOptionsValidation exits

this fixes an issue when tests are run sequentially;
testParameterValidationFeatureFlag (added in swiftlang#897) can fail if run after
testOptionsValidation, because it sets `DOCC_HTML_DIR` to a temporary
directory, which is deleted after the test exits. by resetting the
environment variable in a defer block, we can restore a proper
environment for later tests.

* reset the environment for all ConvertSubcommandTests

* set pwd to a temporary directory

this ensures that the tests aren't affected by the machine environment,
for example if a gitignore'd path contains a symlink
QuietMisdreavus added a commit that referenced this pull request Jul 16, 2024
* unset template environment after testOptionsValidation exits

this fixes an issue when tests are run sequentially;
testParameterValidationFeatureFlag (added in #897) can fail if run after
testOptionsValidation, because it sets `DOCC_HTML_DIR` to a temporary
directory, which is deleted after the test exits. by resetting the
environment variable in a defer block, we can restore a proper
environment for later tests.

* reset the environment for all ConvertSubcommandTests

* set pwd to a temporary directory

this ensures that the tests aren't affected by the machine environment,
for example if a gitignore'd path contains a symlink
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants