Skip to content
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

Adds reference docs links, formatting and refactoring test performance test #11077

Merged
merged 3 commits into from
May 7, 2024

Conversation

santisq
Copy link
Contributor

@santisq santisq commented May 7, 2024

PR Summary

This PR adds many reference links to PowerShell and .NET docs. I'm not sure if the links are correct, please let me know if they should be fixed, I've basically removed https://learn.microsoft.com/en-us from them and made them relative hope that's right.

There are also many formatting changes and also updated the performance tests for Avoid repeated calls to a function to have the same format as the previous tests.

As aside, I feel that Avoid Write-Host should be removed or rewritten. Haven't removed it in this PR but if you feel the same I can open an issue / make a new PR for that. After discussing it in the pwsh Discord the conclusion was that the recommendation is misleading. The usage of static methods from System.Console can be confusing specially for new folks and shouldn't be part of this doc, and the recommendation to use Write-Output instead of Write-Host is also incorrect, first, the explicit usage of Write-Output is not needed to begin with and is only useful when preventing pipeline enumeration with -NoEnumerate or for unrolling a collection i.e.: , (0..10) | Write-Output | ForEach-Object { "[$_]" } vs , (0..10) | ForEach-Object { "[$_]" } and second, the purpose of Write-Host is to send information directly to the console and prevent it's output to be captured by default. So if the intent is to offer a better cmdlet for this purpose, a better recommendation would be to use Write-Verbose instead of Write-Host ?

PR Checklist

  • Descriptive Title: This PR's title is a synopsis of the changes it proposes.
  • Summary: This PR's summary describes the scope and intent of the change.
  • Contributor's Guide: I have read the contributors guide.
  • Style: This PR adheres to the style guide.

This comment was marked as outdated.

Copy link

github-actions bot commented May 7, 2024

Expectations

Thanks for your submission! Here's a quick note to provide you with some context for what to expect from the docs team and the process now that you've submitted a PR. Even if you've contributed to this repo before, we strongly suggest reading this information; it might have changed since you last read it.

To see our process for reviewing PRs, please read our editor's checklist and process for managing pull requests in particular. Below is a brief, high-level summary of what to expect, but our contributor guide has expanded details.

The docs team begins to review your PR if you request them to or if your PR meets these conditions:

  • It is not a draft PR.
  • It does not have a WIP prefix in the title.
  • It passes validation and build steps.
  • It does not have any merge conflicts.
  • You have checked every box in the PR Checklist, indicating you have completed all required steps and marked your PR as Ready to Merge.

You can always request a review at any stage in your authoring process, the docs team is here to help! You do not need to submit a fully polished and finished draft; the docs team can help you get content ready for merge.

While reviewing your PR, the docs team may make suggestions, write comments, and ask questions. When all requirements are satisfied, the docs team marks your PR as Approved and merges it. Once your PR is merged, it is included the next time the documentation is published. For this project, the documentation is published daily at 3 p.m. Pacific Standard Time (PST).

… for `Avoid repeated calls to a function` in the same format as the previous ones.

This comment was marked as outdated.

@sdwheeler
Copy link
Contributor

I did some minor editing to conform to our style guidelines and updated the notes about Write-Host.

This comment was marked as outdated.

Copy link
Contributor

Learn Build status updates of commit dcd1947:

⚠️ Validation status: warnings

File Status Preview URL Details
reference/docs-conceptual/dev-cross-plat/performance/script-authoring-considerations.md ⚠️Warning View (>=powershell-5.1) Details

reference/docs-conceptual/dev-cross-plat/performance/script-authoring-considerations.md

  • Line 636, Column 3: [Warning: file-not-found - See documentation] Invalid file link: 'System.Collections.Generic.List`1.Add*'.

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.

For any questions, please:

@sdwheeler sdwheeler merged commit 3b9ab5b into MicrosoftDocs:main May 7, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants