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 — Backport MSDocs changes by bergmeister · Pull Request #2085 · PowerShell/PSScriptAnalyzer

Conversation

@bergmeister

@bergmeister Christoph Bergmeister (bergmeister) commented Mar 15, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Collaborator

PR Summary

  • Where references to files in MSDoccs were present (e.g. in UseShouldProcessForStateChangingFunctions), replaced with the live URLs.
  • Did not port back TODO block of AvoidAssignmentToAutomaticVariable.md from https://github.com/MicrosoftDocs/PowerShell-Docs-Modules/pull/241/files#diff-1db3dc2f98da1fa58e24bac28ea9f14f507c78d8299349aa0196f01f9479b6f5

Backported PRs:

  • https://github.com/MicrosoftDocs/PowerShell-Docs-Modules/pull/281/files
  • MicrosoftDocs/PowerShell-Docs-Modules@ff80de6
  • https://github.com/MicrosoftDocs/PowerShell-Docs-Modules/pull/275/files
  • Explain the proper use of a SwitchParameter MicrosoftDocs/PowerShell-Docs-Modules#278
  • https://github.com/MicrosoftDocs/PowerShell-Docs-Modules/pull/235/files
  • https://github.com/MicrosoftDocs/PowerShell-Docs-Modules/pull/276/files
  • Replaced duplicate link and improved examples for $null MicrosoftDocs/PowerShell-Docs-Modules#273
  • Provide more guidance for file encoding MicrosoftDocs/PowerShell-Docs-Modules#285
  • MicrosoftDocs/PowerShell-Docs-Modules@6ca872b#diff-b3e50d455fe1b464a6fec38ac616cbde4a412766a05a606c1ae55be90ccb63a3
  • Describe the purpose of ShouldProcess MicrosoftDocs/PowerShell-Docs-Modules#277

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
@bergmeister
Christoph Bergmeister (bergmeister) requested review from Mikey Lombardi (He/Him) (michaeltlombardi) and Sean Wheeler (sdwheeler) as code owners March 15, 2025 16:35
@bergmeister Christoph Bergmeister (bergmeister) changed the title Backport MSDmsdocs changes. Where references to files in MSD… Backport MSDocs changes Mar 15, 2025
@bergmeister Christoph Bergmeister (bergmeister) added the Area - Documentation label Mar 15, 2025
@bergmeister
Christoph Bergmeister (bergmeister) requested a review from Andy Jordan (andyleejordan) March 15, 2025 16:37
@bergmeister Christoph Bergmeister (bergmeister) mentioned this pull request Mar 15, 2025
v1.24.0: Thanks to all the new contributors! #2084
Merged
@bergmeister Christoph Bergmeister (bergmeister) added the Area - Documentation Backport Backport of docs changes in PowerShell-Docs-Modules repo label Mar 15, 2025
Sean Wheeler (sdwheeler) and others added 3 commits March 15, 2025 15:53
@sdwheeler
Backport docs updates from docs repo
b166135
@bergmeister @sdwheeler
Backport msdocs changes for Cmdlets. Where references to files in MSD…
9e546e4
…ocs were present (e.g. in UseShouldProcessForStateChangingFunctions), replaced with the live URLs. Did not port back TODO block of AvoidAssignmentToAutomaticVariable.md from https://github.com/MicrosoftDocs/PowerShell-Docs-Modules/pull/241/files#diff-1db3dc2f98da1fa58e24bac28ea9f14f507c78d8299349aa0196f01f9479b6f5

Backported PRs:
- https://github.com/MicrosoftDocs/PowerShell-Docs-Modules/pull/281/files
- MicrosoftDocs/PowerShell-Docs-Modules@ff80de6
- https://github.com/MicrosoftDocs/PowerShell-Docs-Modules/pull/275/files
- MicrosoftDocs/PowerShell-Docs-Modules#278
- https://github.com/MicrosoftDocs/PowerShell-Docs-Modules/pull/235/files
- https://github.com/MicrosoftDocs/PowerShell-Docs-Modules/pull/276/files
- MicrosoftDocs/PowerShell-Docs-Modules#273
- MicrosoftDocs/PowerShell-Docs-Modules#285
- MicrosoftDocs/PowerShell-Docs-Modules@6ca872b#diff-b3e50d455fe1b464a6fec38ac616cbde4a412766a05a606c1ae55be90ccb63a3
- MicrosoftDocs/PowerShell-Docs-Modules#277
@sdwheeler
Merge branch 'sdw-w406969-pssa-124' into 24.0-docsbackport
fbf2905
@sdwheeler
Sean Wheeler (sdwheeler) force-pushed the 24.0-docsbackport branch from 7543854 to fbf2905 Compare March 15, 2025 20:58
@sdwheeler

Sean Wheeler (sdwheeler) commented Mar 15, 2025

Copy link
Copy Markdown
Contributor

Christoph Bergmeister (@bergmeister) I had changes in flight for this already and my changes had a few things you missed. I added my changes to this PR.

bergmeister reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

sdwheeler
Sean Wheeler (sdwheeler) approved these changes Mar 15, 2025
View reviewed changes

@sdwheeler Sean Wheeler (sdwheeler) left a comment

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.

LGTM

Sorry, something went wrong.

Uh oh!

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

All reactions
@sdwheeler Sean Wheeler (sdwheeler) mentioned this pull request Mar 15, 2025
Document new optional parameters added to UseCorrectCasing in #1704 #2086
Merged
5 of 6 tasks
bergmeister
Christoph Bergmeister (bergmeister) commented Mar 17, 2025
View reviewed changes
Comment thread docs/Cmdlets/Invoke-ScriptAnalyzer.md Resolved

Uh oh!

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

bergmeister
Christoph Bergmeister (bergmeister) commented Mar 17, 2025
View reviewed changes
Comment thread docs/Rules/AvoidAssignmentToAutomaticVariable.md
Comment on lines +19 to +23
<!-- TODO
Ability to suppress was added in https://github.com/PowerShell/PSScriptAnalyzer/pull/1896
Need documentation for how to configure suppression of this rule.
-->

@bergmeister Christoph Bergmeister (bergmeister) Mar 17, 2025

Copy link
Copy Markdown
Collaborator 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.

In my original PR I left this out because this comment relates more to work in MSDocs. Maybe a GitHub issue is a better place for it than a comment?

Sorry, something went wrong.

Uh oh!

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

All reactions

@sdwheeler Sean Wheeler (sdwheeler) Mar 17, 2025

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.

We should add this information in both repos before release. I couldn't figure out how to configure this. Can you provide an example?

Sorry, something went wrong.

Uh oh!

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

All reactions

@bergmeister Christoph Bergmeister (bergmeister) Mar 17, 2025

Copy link
Copy Markdown
Collaborator 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.

Suppression is not different that any other rule. For example [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidAssignmentToAutomaticVariable', '')] suppresses the rule and [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidAssignmentToAutomaticVariable', 'PID')] makes the suppression specific to assignment to $PID automatic variable

Sorry, something went wrong.

Uh oh!

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

All reactions

@sdwheeler Sean Wheeler (sdwheeler) Mar 17, 2025

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.

Can you only do this in code? Other rules can be configured using JSON. For example: https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/usesingularnouns#configuration

Sorry, something went wrong.

Uh oh!

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

All reactions

@bergmeister Christoph Bergmeister (bergmeister) Mar 17, 2025

Copy link
Copy Markdown
Collaborator 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.

Suppression is only possible via annotating code with this attribute unless one decided to not run rule at all via PSSA settings but I wouldn't call that suppression: https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/using-scriptanalyzer?view=ps-modules#suppressing-rules
What you reference is rule configuration as part of PSSA settings, which is not JSON, it's PowerShell's hashtable format: https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/using-scriptanalyzer?view=ps-modules#settings-support-in-scriptanalyzer

Sorry, something went wrong.

Uh oh!

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

All reactions
@sdwheeler @bergmeister
Update docs/Cmdlets/Invoke-ScriptAnalyzer.md
bd274c0
Co-authored-by: Christoph Bergmeister <[email protected]>
bergmeister
Christoph Bergmeister (bergmeister) commented Mar 17, 2025
View reviewed changes
Comment thread docs/Rules/UseBOMForUnicodeEncodedFile.md Resolved

Uh oh!

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

bergmeister
Christoph Bergmeister (bergmeister) commented Mar 17, 2025
View reviewed changes
Comment thread docs/Rules/UseUTF8EncodingForHelpFile.md Resolved

Uh oh!

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

bergmeister
Christoph Bergmeister (bergmeister) commented Mar 17, 2025
View reviewed changes
Comment thread docs/Rules/UseUTF8EncodingForHelpFile.md Resolved

Uh oh!

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

@sdwheeler @bergmeister
Apply suggestions from code review
e886653
Co-authored-by: Christoph Bergmeister <[email protected]>
@andyleejordan
Andy Jordan (andyleejordan) merged commit 28081e5 into PowerShell:main Mar 17, 2025
@andyleejordan

Andy Jordan (andyleejordan) commented Mar 19, 2025

Copy link
Copy Markdown
Member

Sean Wheeler (@sdwheeler) Christoph Bergmeister (@bergmeister) this seems to have removed some information from #1704 for docs/Rules/UseCorrectCasing.md specifically around keywords and operators. Was that intentional?

All reactions

Sorry, something went wrong.

Uh oh!

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

@sdwheeler

Sean Wheeler (sdwheeler) commented Mar 19, 2025

Copy link
Copy Markdown
Contributor

I have had so many issues with the docs branches. I had a draft update for UserCorrectCasing.md that has gone missing. Let me see if I can find it and update again.

All reactions

Sorry, something went wrong.

Uh oh!

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@michaeltlombardi Mikey Lombardi (He/Him) (michaeltlombardi) Awaiting requested review from michaeltlombardi michaeltlombardi is a code owner
@andyleejordan Andy Jordan (andyleejordan) Awaiting requested review from andyleejordan
1 more reviewer
@sdwheeler Sean Wheeler (sdwheeler) sdwheeler 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

Area - Documentation Backport Backport of docs changes in PowerShell-Docs-Modules repo Area - Documentation

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

3 participants

@bergmeister @sdwheeler @andyleejordan
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 01402503 — 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.