GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fixes #1722 - Update cmdlet docs for 1.20.0 by sdwheeler · Pull Request #1726 · PowerShell/PSScriptAnalyzer

Conversation

@sdwheeler

@sdwheeler Sean Wheeler (sdwheeler) commented Oct 7, 2021

Copy link
Copy Markdown
Contributor

PR Summary

Fixes #1722 - Prepare cmdlet reference for publication on docs.microsoft.com

  • Updated content accuracy for 1.20.0
  • Fixed formatting to conform to docs standards
  • Created PSScriptAnalyzer.md, which is required for the docs platform

PR Checklist

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Change is not breaking
  • Make sure all .cs, .ps1 and .psm1 files have the correct copyright header
  • Make sure you've added a new test if existing tests do not effectively test the code changed and/or updated documentation
  • This PR is ready to merge and is not Work in Progress.
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sdwheeler
Update cmdlet docs for 1.20.0
25ca70e
@rjmholt

Rob Holt (rjmholt) commented Oct 7, 2021

Copy link
Copy Markdown
Contributor

Looks like cmdlet help tests are failing:

##[error] [-] Cmdlet help.gets example help from  21ms (18ms|2ms)
##[error]  Expected a value, but got $null or empty.
##[error]  at ($Help.Examples.Example.Remarks | Select-Object -First 1).Text | Should -Not -BeNullOrEmpty, /home/vsts/work/1/s/Tests/Engine/ModuleHelp.Tests.ps1:121
##[error]  at <ScriptBlock>, /home/vsts/work/1/s/Tests/Engine/ModuleHelp.Tests.ps1:121
##[error] [-] Cmdlet help.gets example help from  9ms (7ms|2ms)
##[error]  Expected a value, but got $null or empty.
##[error]  at ($Help.Examples.Example.Remarks | Select-Object -First 1).Text | Should -Not -BeNullOrEmpty, /home/vsts/work/1/s/Tests/Engine/ModuleHelp.Tests.ps1:121
##[error]  at <ScriptBlock>, /home/vsts/work/1/s/Tests/Engine/ModuleHelp.Tests.ps1:121
##[error] [-] Cmdlet help.gets example help from  8ms (7ms|2ms)
##[error]  Expected a value, but got $null or empty.
##[error]  at ($Help.Examples.Example.Remarks | Select-Object -First 1).Text | Should -Not -BeNullOrEmpty, /home/vsts/work/1/s/Tests/Engine/ModuleHelp.Tests.ps1:121
##[error]  at <ScriptBlock>, /home/vsts/work/1/s/Tests/Engine/ModuleHelp.Tests.ps1:121
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sdwheeler

Sean Wheeler (sdwheeler) commented Oct 7, 2021

Copy link
Copy Markdown
Contributor Author

Rob Holt (@rjmholt) I checked to see if there were tests. I couldn't find them. I will take another look and fix them.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sdwheeler
Removed the test for Remarks
775b14e
@sdwheeler

Sean Wheeler (sdwheeler) commented Oct 7, 2021

Copy link
Copy Markdown
Contributor Author

Rob Holt (@rjmholt) I removed the test for Remarks in the example. Remarks are optional. The only thing we need to validate is that there is a code block in the example.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

rjmholt
Rob Holt (rjmholt) reviewed Oct 7, 2021
View reviewed changes
Comment thread Tests/Engine/ModuleHelp.Tests.ps1
Comment on lines -118 to -122

# Should be at least one example description
It "gets example help from $commandName" -TestCases $testCases {
($Help.Examples.Example.Remarks | Select-Object -First 1).Text | Should -Not -BeNullOrEmpty
}

@rjmholt Rob Holt (rjmholt) Oct 7, 2021

Copy link
Copy Markdown
Contributor

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.

I think we're better off not removing tests like this if we can avoid it — it's a nice bar on doc quality that we require examples.

If docs are just being updated, what caused this to fail?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@sdwheeler Sean Wheeler (sdwheeler) Oct 7, 2021

Copy link
Copy Markdown
Contributor Author

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.

I agree, I wouldn't normally want to remove a test but the Remarks are optional.

The test broke because the Remarks were moved. In some cases, the Remark was incorporated into the Example title. In others it was move before the code block as an intro.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@sdwheeler Sean Wheeler (sdwheeler) Oct 7, 2021

Copy link
Copy Markdown
Contributor Author

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.

For higher quality, we should be testing the following:

  • every parameter of a cmdlet exists in the markdown
  • each parameter has description
  • the markdown does not contain any parameters that the cmdlet doesn't have

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sdwheeler
Fix typos
be3e887
rjmholt
Rob Holt (rjmholt) approved these changes Oct 12, 2021
View reviewed changes
@rjmholt
Rob Holt (rjmholt) merged commit b063f90 into PowerShell:master Oct 12, 2021
@sdwheeler
Sean Wheeler (sdwheeler) deleted the sdw-i1722 branch May 23, 2022 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@rjmholt Rob Holt (rjmholt) rjmholt approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Edit cmdlet reference to prepare for publishing on docs platform

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@sdwheeler @rjmholt
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.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.