docs: tag every documented method's parameters and return - #58
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
yard statsalready reported 100% documented, which hid the actual gap: every method had a docstring, but twelve of them documented only what the method does and left the signature untagged.Prose, no
@param, no@return. YARD counts that as documented — the metric measures presence, not completeness — so the driver looked fully covered while a reader still had to go read the body to learn thatstateis mutated and what comes back.Twelve methods, all of them either private helpers or
initialize:driver/cloudstack.rbdeploy_instance,hostname_for,apply_credentialscloudstack/client.rbinitialize,job_errorcloudstack/credentials.rbinitializecloudstack/networking.rbinitialize,create_port_forward,teardown,tolerating_missingcloudstack/server_options.rbinitialize,truncate_to_budgetThe tags say which
statekeys each method adds, since that is the part worth knowing and the part the prose kept implicit —deploy_instancegainsserver_id,hostname_forgainsipaddressidandforwardingruleid,create_port_forwardgainsforwardingruleid.tolerating_missingalso gets the@yieldand the@raiseit re-raises on.Documentation only. No behaviour changed.
Verification
@param(checked by script: 0 remaining)yard stats— 44 methods, 0 undocumented, 100%rake test— 63 examples, 0 failurescookstyle --chefstyle— 9 files, no offenses