Skip to content

(MAINT) Update URLs for site rebrand #1844

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

Merged
merged 4 commits into from
Sep 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ blank_issues_enabled: false
contact_links:
- name: Report a User documentation issue
url: https://github.com/MicrosoftDocs/PowerShell-Docs-Modules/issues/new/choose
about: Report issues about the user documentation available on docs.microsoft.com.
about: Report issues about the user documentation available on learn.microsoft.com.
18 changes: 10 additions & 8 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@

### Miscellaneous

- Set Assembly version attribute (#1549) (by @JamesWTruher)
- Set Assembly version attribute (#1549) (by @JamesWTruher)

### Documentation

Expand Down Expand Up @@ -209,7 +209,7 @@ The PRs for those improvements are:

## [1.18.3](https://github.com/PowerShell/PSScriptAnalyzer/tree/1.18.3) - 2019-09-13

This release adds one more important fix, which prevents a leak of runspaces when repeatedly invoking the PSScriptAnalyzer cmdlets. Furthermore it ups the minimum version of PowerShell Core to `6.2.0` due to `6.1` reaching its [end of life](https://docs.microsoft.com/en-us/powershell/scripting/powershell-support-lifecycle?view=powershell-6#powershell-releases-end-of-life) this month.
This release adds one more important fix, which prevents a leak of runspaces when repeatedly invoking the PSScriptAnalyzer cmdlets. Furthermore it ups the minimum version of PowerShell Core to `6.2.0` due to `6.1` reaching its [end of life](https://learn.microsoft.com/powershell/scripting/install/PowerShell-Support-Lifecycle#powershell-end-of-support-dates) this month.

- Change CommandInfoCache to implement IDisposable and clean up the runspace pool (#1335) (by @JamesWTruher)
- Update Newtonsoft json to 12.0.1 due to PowerShell 6.1 going out of support (#1336) (by @bergmeister)
Expand Down Expand Up @@ -275,11 +275,11 @@ The benefit to the user will be some enhancements and fixes in the formatter, es
- Convert compatibility module to binary module, fix compatibility with Azure environments (#1212) (by @rjmholt)
- Prevent .NET members with names differing only by case from crashing the compatibility profiler (#1195) (by @rjmholt)
- Fix compatibility profile query API so that aliases referring to other modules appear (#1194) (by @rjmholt)

- DSC
- Instead of using the first cimClass and then having no superClass, use the first cimClass that has a non-null superClass (#1200) (by @bergmeister, thanks to @ykuijs! for the great collaboration)
- Make `-SaveDscDependency` work on Linux (#1246) (by @bergmeister)

- Enable suppression of custom rules when used together with `-IncludeDefaultRules` to allow all possible scenarios from 1.17.1 and 1.18.0. This removes also the check if the rule name in the suppression attribute can be found because this check is technically not possible in all scenarios (#1245) (by @bergmeister)
- Fix NullReferenceException for class type (#1182) (by @bergmeister)

Expand Down Expand Up @@ -492,7 +492,7 @@ Multi-threading efficiency was highly improved leading to a speedup whilst keepi
- Add simple GitHub Pull Request template based off the one for PowerShell Core (#866) (by @bergmeister)
- Add a simple GitHub issue template based on the one of PowerShell Core. (#865, #884) (by @bergmeister)
- Fix Example 7 in Invoke-ScriptAnalyzer.md (#862) (Thanks @sethvs!)
- Use the typewriter apostrophe instead the typographic apostrophe (#855) (Thanks @alexandear!)
- Use the typewriter apostrophe instead the typographic apostrophe (#855) (Thanks @alexandear!)
- Add justification to ReadMe (#848) (Thanks @KevinMarquette!)
- Fix typo in README (#845) (Thanks @misterGF!)

Expand Down Expand Up @@ -768,7 +768,8 @@ A big **Thank You!** to the following folks for making PSScriptAnalyzer even bet
### Fixes:
#### Engine:
- Engine update to prevent script based injection attacks
- CustomizedRulePath is now called CustomRulePath – Fixes to handle folder paths
- CustomizedRulePath is now called CustomRulePath
- Fixes to handle folder paths
- Fixes for RecurseCustomRulePath functionality
- Fix to binplace cmdlet help file as part of build process
- ScriptAnalyzer Profile is now called Settings
Expand All @@ -786,7 +787,8 @@ A big **Thank You!** to the following folks for making PSScriptAnalyzer even bet
- Update to Credential based rules to validate the presence of CredentialAttribute and PSCredential type

### Documentation:
- Rule & Cmdlet documentation updates – Cmdlet help file addition
- Rule & Cmdlet documentation updates
- Cmdlet help file addition

## [1.1.1](https://github.com/PowerShell/PSScriptAnalyzer/tree/1.1.1) - 2015-11-03
### Features:
Expand Down Expand Up @@ -827,7 +829,7 @@ A big **Thank You!** to the following folks for making PSScriptAnalyzer even bet

### Rules:
- New rule to validate the presence of deprecated module manifest fields.
- Removed PSAvoidTrapStatement rule from the builtin set – since this is not deprecated and using trap is a better choice in certain scenarios.
- Removed PSAvoidTrapStatement rule from the builtin set since this is not deprecated and using trap is a better choice in certain scenarios.

### Fixes:
- Verbose Message rule applies to only DSC cmdlet based resources.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public class OperatingSystemData : ICloneable
/// <summary>
/// The Windows SKU identifier, corresponding to
/// the GetProductInfo() sysinfo API:
/// https://docs.microsoft.com/en-us/windows/desktop/api/sysinfoapi/nf-sysinfoapi-getproductinfo
/// https://learn.microsoft.com/windows/desktop/api/sysinfoapi/nf-sysinfoapi-getproductinfo
/// </summary>
[DataMember(EmitDefaultValue = false)]
public uint? SkuId { get; set; }
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,33 +40,33 @@ PowerShell code such as:
## DOCUMENTATION NOTICE

Conceptual user documentation has been moved out of the source code repository and into the
documentation repository so that it can be published on docs.microsoft.com.
documentation repository so that it can be published on learn.microsoft.com.

The goal of this migration is to have the user documentation on docs.microsoft.com. The source code
The goal of this migration is to have the user documentation on learn.microsoft.com. The source code
repository should only contain documentation for the code base, such as how to build the code or how
to contribute to the code.

User documentation that has been migrated:

- Most of the contents of this README can be found in the
[PSScriptAnalyzer overview](https://docs.microsoft.com/powershell/utility-modules/psscriptanalyzer/overview)
[PSScriptAnalyzer overview](https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/overview)
- For cmdlet reference, see
[PSScriptAnalyzer](https://docs.microsoft.com/powershell/module/psscriptanalyzer)
[PSScriptAnalyzer](https://learn.microsoft.com/powershell/module/psscriptanalyzer)
- For rules, see
[Rules overview](https://docs.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/readme)
[Rules overview](https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/readme)
- The `PowerShellBestPractices.md` content has been moved to
[PSScriptAnalyzer rules and recommendations](https://docs.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules-recommendations)
[PSScriptAnalyzer rules and recommendations](https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules-recommendations)
- The `ScriptRuleDocumentation.md` content has been moved to
[Creating custom rules](https://docs.microsoft.com/powershell/utility-modules/psscriptanalyzer/create-custom-rule)
[Creating custom rules](https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/create-custom-rule)

There is one exception - the documentation for the rules and cmdlets will remain in the [docs](docs)
folder to facilitate build testing and to be archived as part of each release. Only the
documentation for the latest release is published on on docs.microsoft.com.
documentation for the latest release is published on on learn.microsoft.com.

## Installation

To install **PSScriptAnalyzer** from the PowerShell Gallery, see
[Installing PSScriptAnalyzer](https://docs.microsoft.com/powershell/utility-modules/psscriptanalyzer/overview#installing-psscriptanalyzer).
[Installing PSScriptAnalyzer](https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/overview#installing-psscriptanalyzer).

To install **PSScriptAnalyzer** from source code:

Expand Down Expand Up @@ -190,7 +190,7 @@ Get-TestFailures
## Using PSScriptAnalyzer

The documentation in this section can be found in
[Using PSScriptAnalyzer](https://docs.microsoft.com/powershell/utility-modules/psscriptanalyzer/using-scriptanalyzer).
[Using PSScriptAnalyzer](https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/using-scriptanalyzer).

## Contributions are welcome

Expand Down
2 changes: 1 addition & 1 deletion build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ function ConvertTo-PortableVersion {
}
}

# see https://docs.microsoft.com/en-us/dotnet/core/tools/global-json for rules
# see https://learn.microsoft.com/dotnet/core/tools/global-json for rules
# on how version checks are done
function Test-SuitableDotnet {
param (
Expand Down
2 changes: 1 addition & 1 deletion docs/Cmdlets/Get-ScriptAnalyzerRule.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ external help file: Microsoft.Windows.PowerShell.ScriptAnalyzer.dll-Help.xml
Module Name: PSScriptAnalyzer
ms.custom: PSSA v1.21.0
ms.date: 10/07/2021
online version: https://docs.microsoft.com/powershell/module/psscriptanalyzer/get-scriptanalyzerrule?view=ps-modules&wt.mc_id=ps-gethelp
online version: https://learn.microsoft.com/powershell/module/psscriptanalyzer/get-scriptanalyzerrule?view=ps-modules&wt.mc_id=ps-gethelp
schema: 2.0.0
---

Expand Down
2 changes: 1 addition & 1 deletion docs/Cmdlets/Invoke-Formatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ external help file: Microsoft.Windows.PowerShell.ScriptAnalyzer.dll-Help.xml
Module Name: PSScriptAnalyzer
ms.custom: PSSA v1.21.0
ms.date: 10/07/2021
online version: https://docs.microsoft.com/powershell/module/psscriptanalyzer/invoke-formatter?view=ps-modules&wt.mc_id=ps-gethelp
online version: https://learn.microsoft.com/powershell/module/psscriptanalyzer/invoke-formatter?view=ps-modules&wt.mc_id=ps-gethelp
schema: 2.0.0
---

Expand Down
4 changes: 2 additions & 2 deletions docs/Cmdlets/Invoke-ScriptAnalyzer.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ external help file: Microsoft.Windows.PowerShell.ScriptAnalyzer.dll-Help.xml
Module Name: PSScriptAnalyzer
ms.custom: PSSA v1.21.0
ms.date: 10/07/2021
online version: https://docs.microsoft.com/powershell/module/psscriptanalyzer/invoke-scriptanalyzer?view=ps-modules&wt.mc_id=ps-gethelp
online version: https://learn.microsoft.com/powershell/module/psscriptanalyzer/invoke-scriptanalyzer?view=ps-modules&wt.mc_id=ps-gethelp
schema: 2.0.0
---

Expand Down Expand Up @@ -514,7 +514,7 @@ following keys:

The keys and values in the profile are interpreted as if they were standard parameters and values of
`Invoke-ScriptAnalyzer`, similar to splatting. For more information, see
[about_Splatting](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_splatting).
[about_Splatting](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_splatting).

```yaml
Type: Object
Expand Down
6 changes: 3 additions & 3 deletions docs/Rules/ProvideCommentHelp.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ presence of comment based help and not on the validity or format.
For assistance on comment based help, use the command `Get-Help about_comment_based_help` or the
following articles:

- [Writing Comment-based Help](https://docs.microsoft.com/powershell/scripting/developer/help/writing-comment-based-help-topics)
- [Writing Help for PowerShell Cmdlets](https://docs.microsoft.com/powershell/scripting/developer/help/writing-help-for-windows-powershell-cmdlets)
- [Create XML-based help using PlatyPS](https://docs.microsoft.com/powershell/scripting/dev-cross-plat/create-help-using-platyps)
- [Writing Comment-based Help](https://learn.microsoft.com/powershell/scripting/developer/help/writing-comment-based-help-topics)
- [Writing Help for PowerShell Cmdlets](https://learn.microsoft.com/powershell/scripting/developer/help/writing-help-for-windows-powershell-cmdlets)
- [Create XML-based help using PlatyPS](https://learn.microsoft.com/powershell/utility-modules/platyps/create-help-using-platyps)
Copy link
Collaborator

@bergmeister bergmeister Sep 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current URL redirects to the correct location. The new URL will come over when 1.21 is released. So the change to docs can wait for the release.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

release of platyps? This is getting too complicated! Can we not just have a clean PR in PSSA please that replicates what your other linked PR does, which is just changing the URL to learn.microsoft.com? And anything else that is still needed but has a different timeline in a separate PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell this PR is clean. Sorry, you misunderstood which release I am talking about. I was talking about the 1.21 of PSSA. The link to the PlatyPS article in the docs repo will redirect so it doesn't need to change right now. But I can change it if you feel strongly. My point is that the change in this PR will get copied to the docs repo when PSSA 1.21 releases.

Copy link
Collaborator

@bergmeister bergmeister Sep 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, gotcha, that means we have to copy this file, the shouldprocess doc and the cmdlet docs: MicrosoftDocs/PowerShell-Docs-Modules#99


## Configuration

Expand Down
11 changes: 8 additions & 3 deletions docs/Rules/ShouldProcess.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ but makes no calls to `ShouldProcess` or it calls `ShouldProcess` but does not d

For more information, see the following articles:

- [about_Functions_Advanced_Methods](/powershell/module/microsoft.powershell.core/about/about_functions_advanced_methods)
- [about_Functions_CmdletBindingAttribute](/powershell/module/microsoft.powershell.core/about/about_Functions_CmdletBindingAttribute)
- [Everything you wanted to know about ShouldProcess](/powershell/scripting/learn/deep-dives/everything-about-shouldprocess)
- [about_Functions_Advanced_Methods](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions_advanced_methods)
- [about_Functions_CmdletBindingAttribute](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_Functions_CmdletBindingAttribute)
- [Everything you wanted to know about ShouldProcess](https://learn.microsoft.com/powershell/scripting/learn/deep-dives/everything-about-shouldprocess)

## How

Expand Down Expand Up @@ -66,5 +66,10 @@ function Set-File
{
$Content | Out-File -FilePath $Path
}
else
{
# Code that should be processed if doing a WhatIf operation
# Must NOT change anything outside of the function / script
}
}
```
2 changes: 1 addition & 1 deletion docs/Rules/UseApprovedVerbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ All cmdlets must used approved verbs.
Approved verbs can be found by running the command `Get-Verb`.

Additional documentation on approved verbs can be found in the microsoft docs page
[Approved Verbs for PowerShell Commands](https://docs.microsoft.com/powershell/scripting/developer/cmdlet/approved-verbs-for-windows-powershell-commands).
[Approved Verbs for PowerShell Commands](https://learn.microsoft.com/powershell/scripting/developer/cmdlet/approved-verbs-for-windows-powershell-commands).
Some unapproved verbs are documented on the approved verbs page and point to approved alternatives.
Try searching for the verb you used to find its approved form. For example, searching for `Read`,
`Open`, or `Search` leads you to `Get`.
Expand Down