-
Notifications
You must be signed in to change notification settings - Fork 1.7k
.ps1xml formatting file doc corrections
#12614
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
base: main
Are you sure you want to change the base?
.ps1xml formatting file doc corrections
#12614
Conversation
This fixes the wrong path used in both `Update-FormatData` examples. The paths used to initially create the custom formatting files are .\MyDotNetTypes.Format.ps1xml and .\MyFileSystem.Format.ps1xml. Before this change, Update-FormatData -PrependPath incorrectly pointed to $HOME\Format\CultureInfo.Format.ps1xml and $PSHOME\Format\MyFileSystem.Format.ps1xml.
Both Update-FormatData examples now use the $HOME\Format example path. This also updates the first example to create the directory before calling Export-FormatData, as the directory doesn't exist by default and Export-FormatData fails if part of the path is missing.
This fixes the incorrect assertion that formatting files **must** use `.format.ps1xml` (only `.ps1xml` is required).
The original note suggests that after copying Win PS formatting files, the signature block should be replaced. However, the files don't actually contain a signature block to begin with. This may cause confusion, so the note is updated with a more generalized suggestion on signing taken from about_Format.ps1xml. Also includes minor style changes and less Windows-specific references.
The 7.x docs use `$HOME\Format` as an example directory. This updates the 5.1 doc to use the same path. It also removes the suggestion to place custom formatting files in Win PS's `$PSHOME`. As this is a system directory, it's not an appropriate location for user files.
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit b3bfac6:
|
| File | Status | Preview URL | Details |
|---|---|---|---|
| reference/docs-conceptual/developer/format/how-to-create-a-formatting-file-format-ps1xml.md | View (>=powershell-5.1) | Details | |
| reference/5.1/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md | ✅Succeeded | View (powershell-5.1) | |
| reference/7.4/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md | ✅Succeeded | View (powershell-7.4) | |
| reference/7.5/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md | ✅Succeeded | View (powershell-7.5) | |
| reference/7.6/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md | ✅Succeeded | View (powershell-7.6) |
reference/docs-conceptual/developer/format/how-to-create-a-formatting-file-format-ps1xml.md
- Line 45, Column 3: [Warning: file-not-found - See documentation]
Invalid file link: '(./writing-a-powershell-formatting-file.md)'. - Line 13, Column 40: [Suggestion: learn-site-link-broken - See documentation]
Link '/powershell/module/microsoft.powershell.core/about/about_signing.md' points to a learn site page that doesn't exist. Check the path or URL and update the link.
For more details, please refer to the build report.
Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit dee3796:
|
| File | Status | Preview URL | Details |
|---|---|---|---|
| reference/docs-conceptual/developer/format/how-to-create-a-formatting-file-format-ps1xml.md | View (>=powershell-5.1) | Details | |
| reference/5.1/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md | ✅Succeeded | View (powershell-5.1) | |
| reference/7.4/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md | ✅Succeeded | View (powershell-7.4) | |
| reference/7.5/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md | ✅Succeeded | View (powershell-7.5) | |
| reference/7.6/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md | ✅Succeeded | View (powershell-7.6) |
reference/docs-conceptual/developer/format/how-to-create-a-formatting-file-format-ps1xml.md
- Line 45, Column 3: [Warning: file-not-found - See documentation]
Invalid file link: '(./writing-a-powershell-formatting-file.md)'. - Line 13, Column 40: [Suggestion: learn-site-link-broken - See documentation]
Link '/powershell/module/microsoft.powershell.core/about/about_signing.md' points to a learn site page that doesn't exist. Check the path or URL and update the link.
For more details, please refer to the build report.
Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit 1918911: 💡 Validation status: suggestions
reference/docs-conceptual/developer/format/how-to-create-a-formatting-file-format-ps1xml.md
For more details, please refer to the build report. Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them. |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit 3262fca: ✅ Validation status: passed
For more details, please refer to the build report. |
.ps1xml formatting file doc corrections
PR Summary
This PR fixes various
.ps1xmlformatting file doc issues.about_Format.ps1xmlexamples.Copy-Item/Export-FormatDatadoesn't create missing directories)..format.ps1xml(only.ps1xmlis required).PR Checklist