Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix typos#19058

Merged
PaulHigin merged 1 commit into
PowerShell:masterPowerShell/PowerShell:masterfrom
vaerksted:masterCopy head branch name to clipboard
Jan 30, 2023
Merged

fix typos#19058
PaulHigin merged 1 commit into
PowerShell:masterPowerShell/PowerShell:masterfrom
vaerksted:masterCopy head branch name to clipboard

Conversation

@spaette
Copy link
Copy Markdown
Contributor

@spaette spaette commented Jan 28, 2023

This fixes triple slash XML C# comments.


The below might be clarified for a follow-up PR.

What's the fix?

PArent

$ grep -nr PArent PowerShell
PowerShell/src/Microsoft.Management.UI.Internal/HelpWindow/ParagraphSearcher.cs:47:            Debug.Assert(caretPosition.Parent != null && caretPosition.Parent is Run, "a caret PArent is allways a valid Run");
$ 

What's the fix?

exceptions's

$ grep -nr exceptions\'s PowerShell
PowerShell/src/System.Management.Automation/engine/hostifaces/LocalConnection.cs:1515:        /// <param name="innerException">The exceptions's inner exception.</param>
PowerShell/src/System.Management.Automation/engine/ExtendedTypeSystemException.cs:39:        /// <param name="innerException">The exceptions's inner exception.</param>
PowerShell/src/System.Management.Automation/engine/ExtendedTypeSystemException.cs:115:        /// <param name="innerException">The exceptions's inner exception.</param>
PowerShell/src/System.Management.Automation/engine/ExtendedTypeSystemException.cs:186:        /// <param name="innerException">The exceptions's inner exception.</param>
PowerShell/src/System.Management.Automation/engine/ExtendedTypeSystemException.cs:255:        /// <param name="innerException">The exceptions's inner exception.</param>
PowerShell/src/System.Management.Automation/engine/ExtendedTypeSystemException.cs:322:        /// <param name="innerException">The exceptions's inner exception.</param>
PowerShell/src/System.Management.Automation/engine/ExtendedTypeSystemException.cs:391:        /// <param name="innerException">The exceptions's inner exception.</param>
PowerShell/src/System.Management.Automation/engine/ExtendedTypeSystemException.cs:458:        /// <param name="innerException">The exceptions's inner exception.</param>
PowerShell/src/System.Management.Automation/engine/ExtendedTypeSystemException.cs:525:        /// <param name="innerException">The exceptions's inner exception.</param>
PowerShell/src/System.Management.Automation/engine/ExtendedTypeSystemException.cs:620:        /// <param name="innerException">The exceptions's inner exception.</param>
PowerShell/src/System.Management.Automation/engine/lang/scriptblock.cs:1362:        /// <param name="innerException">The exceptions's inner exception.</param>
PowerShell/src/System.Management.Automation/utils/MetadataExceptions.cs:51:        /// <param name="innerException">The exceptions's inner exception.</param>
PowerShell/src/System.Management.Automation/utils/MetadataExceptions.cs:127:        /// <param name="innerException">The exceptions's inner exception.</param>
PowerShell/src/System.Management.Automation/utils/MetadataExceptions.cs:201:        /// <param name="innerException">The exceptions's inner exception.</param>
PowerShell/src/System.Management.Automation/utils/MetadataExceptions.cs:249:        /// <param name="innerException">The exceptions's inner exception.</param>
$ 

What's the fix?

requests's

$ grep -nr requests\'s PowerShell
PowerShell/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs:1577:        /// Because this function sets the request's ContentLength property and writes content data into the requests's stream,
PowerShell/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs:1602:        /// Because this function sets the request's ContentLength property and writes content data into the requests's stream,
PowerShell/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs:1681:        /// Because this function sets the request's ContentLength property and writes content data into the requests's stream,
PowerShell/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs:1703:        /// Because this function sets the request's ContentLength property and writes content data into the requests's stream,
$ 

What's the fix?

espacing

$ grep -nr espacing PowerShell
PowerShell/src/System.Management.Automation/namespaces/RegistryProvider.cs:804:                    // This text element needs espacing
PowerShell/src/System.Management.Automation/namespaces/RegistryProvider.cs:853:                    // This text element needs espacing
$ 

What's the fix?

Find entires those are not in both list lists.

$ grep -nr entires PowerShell
PowerShell/src/System.Management.Automation/security/CatalogHelper.cs:692:            // Find entires those are not in both list lists. These should be empty lists for success
$ 

What's the author's intention here?

tell's use what

$ ed -s PowerShell/src/System.Management.Automation/engine/ComInterop/IDispatchComObject.cs <<<'20,27p'
    /// This currently has the following issues:
    /// 1. IDispatch cannot distinguish between properties and methods with 0 arguments (and non-0
    ///    default arguments?). So obj.foo() is ambiguous as it could mean invoking method foo,
    ///    or it could mean invoking the function pointer returned by property foo.
    ///    We are attempting to find whether we need to call a method or a property by examining
    ///    the ITypeInfo associated with the IDispatch. ITypeInfo tell's use what parameters the method
    ///    expects, is it a method or a property, what is the default property of the object, how to
    ///    create an enumerator for collections etc.
$ 

What's the author's intention here?

thexct that
thext that

$ ed -s PowerShell/src/Microsoft.Management.UI.Internal/HelpWindow/ParagraphBuilder.cs <<<'14,16p'
    /// Builds a paragraph based on Text + Bold + Highlight information.
    /// Bold are the segments of thexct that should be bold, and Highlight are
    /// the segments of thext that should be highlighted (like search results).
$ 

A decision could be made on whether to change to AmbiguousAuthentication.

$ grep -nr AmbiguosAuthentication PowerShell
PowerShell/src/Microsoft.WSMan.Management/WsManHelper.cs:618:                    "AmbiguosAuthentication",
PowerShell/src/Microsoft.WSMan.Management/WsManHelper.cs:629:                    "AmbiguosAuthentication",
PowerShell/src/Microsoft.WSMan.Management/resources/WsManResources.txt:59:AmbiguosAuthentication=A {0} cannot be specified when {1} is specified.
PowerShell/src/Microsoft.WSMan.Management/resources/WsManResources.resx:194:  <data name="AmbiguosAuthentication" xml:space="preserve">
$ 

A decision could be made on whether to change to IsHomogeneousArray.

$ grep -nr IsHomogenousArray PowerShell
PowerShell/src/System.Management.Automation/engine/parser/Compiler.cs:438:        internal static readonly MethodInfo PSInvokeMemberBinder_IsHomogenousArray =
PowerShell/src/System.Management.Automation/engine/parser/Compiler.cs:439:            typeof(PSInvokeMemberBinder).GetMethod(nameof(PSInvokeMemberBinder.IsHomogenousArray), StaticFlags);
PowerShell/src/System.Management.Automation/engine/runtime/Binding/Binders.cs:97:                    ? CachedReflectionInfo.PSInvokeMemberBinder_IsHomogenousArray.MakeGenericMethod(effectiveArgType.GetElementType())
PowerShell/src/System.Management.Automation/engine/runtime/Binding/Binders.cs:7375:        internal static bool IsHomogenousArray<T>(object[] args)
$

A decision could be made on whether to change to successfulDecompression.

$ grep -nr sucessfulDecompression PowerShell
PowerShell/src/System.Management.Automation/help/UpdatableHelpSystem.cs:1100:            bool sucessfulDecompression = false;
PowerShell/src/System.Management.Automation/help/UpdatableHelpSystem.cs:1107:                    sucessfulDecompression = true;
PowerShell/src/System.Management.Automation/help/UpdatableHelpSystem.cs:1119:            return sucessfulDecompression;
PowerShell/src/System.Management.Automation/help/UpdatableHelpSystem.cs:1140:            bool sucessfulDecompression = false;
PowerShell/src/System.Management.Automation/help/UpdatableHelpSystem.cs:1142:            sucessfulDecompression = ExpandArchive(Path.Combine(sourceDirectory, Path.GetFileName(srcPath)), destPath);
PowerShell/src/System.Management.Automation/help/UpdatableHelpSystem.cs:1155:            sucessfulDecompression = CabinetExtractorFactory.GetCabinetExtractor().Extract(Path.GetFileName(srcPath), sourceDirectory, destPath);
PowerShell/src/System.Management.Automation/help/UpdatableHelpSystem.cs:1157:            if (!sucessfulDecompression)
$ 

Other fixes for a follow-up PR.

$ cat typos.sh
#!/bin/bash

sed -i "s/Recruse/Recurse/g" PowerShell/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs
sed -i "s/Simplyfing/Simplifying/g" PowerShell/src/System.Management.Automation/engine/ParameterBinderBase.cs
sed -i "s/Temeporary/Temporary/g" PowerShell/src/System.Management.Automation/engine/SessionStateContainer.cs
sed -i "s/accessable/accessible/g" PowerShell/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs
sed -i "s/accidently/accidentally/g" PowerShell/src/System.Management.Automation/engine/parser/tokenizer.cs
sed -i "s/agregate/aggregate/g" PowerShell/src/Microsoft.Management.UI.Internal/ShowCommand/ViewModel/AllModulesViewModel.cs
sed -i "s/alloted/allotted/g" PowerShell/src/Microsoft.PowerShell.ConsoleHost/host/msh/PendingProgress.cs
sed -i "s/allways/always/g" PowerShell/src/Microsoft.Management.UI.Internal/HelpWindow/ParagraphSearcher.cs
sed -i "s/appearand/appear/g" PowerShell/src/System.Management.Automation/engine/remoting/fanin/InitialSessionStateProvider.cs
sed -i "s/ arround/around/g" PowerShell/src/Microsoft.Management.UI.Internal/HelpWindow/ParagraphSearcher.cs
sed -i "s/calee/callee/g" PowerShell/src/System.Management.Automation/engine/ComInterop/VarEnumSelector.cs
sed -i "s/callees/callee's/g" PowerShell/src/System.Management.Automation/engine/pipeline.cs
sed -i "s/callers/caller's/g" PowerShell/src/System.Management.Automation/engine/pipeline.cs
sed -i "s/catched/caught/g" PowerShell/src/System.Management.Automation/engine/Modules/ModuleSpecification.cs
sed -i "s/combineable/combinable/g" PowerShell/src/TypeCatalogGen/TypeCatalogGen.cs
sed -i "s/compatability/compatibility/g" PowerShell/src/System.Management.Automation/namespaces/FileSystemSecurity.cs
sed -i "s/compatability/compatibility/g" PowerShell/src/System.Management.Automation/engine/remoting/commands/remotingcommandutil.cs
sed -i "s/compatability/compatibility/g" PowerShell/src/System.Management.Automation/engine/InitialSessionState.cs
sed -i "s/constrcutor/constructor/g" PowerShell/src/System.Management.Automation/engine/CoreAdapter.cs
sed -i "s/convertable/convertible/g" PowerShell/src/Microsoft.PowerShell.Commands.Management/commands/management/GetComputerInfoCommand.cs
sed -i "s/convertable/convertible/g" PowerShell/src/System.Management.Automation/engine/NativeCommandParameterBinder.cs
sed -i "s/definations/definitions/g" PowerShell/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs
sed -i "s/disbled/disabled/g" PowerShell/src/System.Management.Automation/engine/debugger/debugger.cs
sed -i "s/dissasembler/disassembler/g" PowerShell/test/perf/dotnet-tools/BenchmarkDotNet.Extensions/PerfLabExporter.cs
sed -i "s/everytime/every time/g" PowerShell/src/System.Management.Automation/engine/remoting/commands/CustomShellCommands.cs
sed -i "s/everytime/every time/g" PowerShell/src/System.Management.Automation/engine/hostifaces/InternalHostUserInterface.cs
sed -i "s/exeuction/execution/g" PowerShell/src/System.Management.Automation/security/SecurityManager.cs
sed -i "s/forwad/forward/g" PowerShell/src/System.Management.Automation/help/AliasHelpProvider.cs
sed -i "s/highligthed/highlighted/g" PowerShell/src/Microsoft.Management.UI.Internal/HelpWindow/ParagraphSearcher.cs
sed -i "s/inifinite/infinite/g" PowerShell/test/perf/dotnet-tools/BenchmarkDotNet.Extensions/TooManyTestCasesValidator.cs
sed -i "s/interation/iteration/g" PowerShell/src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs
sed -i "s/interation/iteration/g" PowerShell/test/perf/benchmarks/Engine.ScriptBlock.cs
sed -i "s/interation/iteration/g" PowerShell/test/perf/benchmarks/Engine.Compiler.cs
sed -i "s/intialized/initialized/g" PowerShell/test/hosting/test_HostingBasic.cs
sed -i "s/machanism/mechanism/g" PowerShell/src/System.Management.Automation/FormatAndOutput/common/FormattingObjects.cs
sed -i "s/marshaled/marshalled/g" PowerShell/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs
sed -i "s/occuring/occurring/g" PowerShell/src/System.Management.Automation/engine/debugger/debugger.cs
sed -i "s/occuring/occurring/g" PowerShell/test/powershell/Language/Scripting/NativeExecution/NativeCommandArguments.Tests.ps1
sed -i "s/ouptut/output/g" PowerShell/src/System.Management.Automation/namespaces/FileSystemContentStream.cs
sed -i "s/porper/proper/g" PowerShell/src/System.Management.Automation/engine/InitialSessionState.cs
sed -i "s/seperator/separator/g" PowerShell/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs
sed -i "s/slighlty/slightly/g" PowerShell/test/perf/dotnet-tools/BenchmarkDotNet.Extensions/RecommendedConfig.cs
sed -i "s/specifeid/specified/g" PowerShell/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs
sed -i "s/superceded/superseded/g" PowerShell/src/System.Management.Automation/engine/ParameterBinderController.cs
sed -i "s/supercedes/supersedes/g" PowerShell/src/System.Management.Automation/engine/parser/Parser.cs
sed -i "s/supplys/supplies/g" PowerShell/src/System.Management.Automation/help/ProviderContext.cs
sed -i "s/surrogage/surrogate/g" PowerShell/src/System.Management.Automation/FormatAndOutput/common/ILineOutput.cs
sed -i "s/surrogage/surrogate/g" PowerShell/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleControl.cs
sed -i "s/telementry/telemetry/g" PowerShell/src/System.Management.Automation/engine/hostifaces/ConnectionBase.cs
sed -i "s/telementry/telemetry/g" PowerShell/src/System.Management.Automation/engine/GetCommandCommand.cs
sed -i "s/terinating/terminating/g" PowerShell/src/System.Management.Automation/engine/Interop/Windows/QueryDosDevice.cs
sed -i "s/termianted/terminated/g" PowerShell/src/System.Management.Automation/utils/tracing/PSEtwLogProvider.cs
sed -i "s/no thave/not have/g" PowerShell/src/System.Management.Automation/FormatAndOutput/common/FormatViewGenerator.cs
sed -i "s/no thave/not have/g" PowerShell/src/System.Management.Automation/FormatAndOutput/common/FormatViewGenerator_Complex.cs
sed -i "s/undesireable/undesirable/g" PowerShell/src/System.Management.Automation/namespaces/FileSystemProvider.cs
sed -i "s/unecessary/unnecessary/g" PowerShell/src/Microsoft.Management.UI.Internal/HelpWindow/ParagraphBuilder.cs
$ 

@pull-request-quantifier-deprecated
Copy link
Copy Markdown

This PR has 4 quantified lines of changes. In general, a change size of upto 200 lines is ideal for the best PR experience!


Quantification details

Label      : Extra Small
Size       : +2 -2
Percentile : 1.6%

Total files changed: 55

Change summary by file extension:
.cs : +2 -2

Change counts above are quantified counts, based on the PullRequestQuantifier customizations.

Why proper sizing of changes matters

Optimal pull request sizes drive a better predictable PR flow as they strike a
balance between between PR complexity and PR review overhead. PRs within the
optimal size (typical small, or medium sized PRs) mean:

  • Fast and predictable releases to production:
    • Optimal size changes are more likely to be reviewed faster with fewer
      iterations.
    • Similarity in low PR complexity drives similar review times.
  • Review quality is likely higher as complexity is lower:
    • Bugs are more likely to be detected.
    • Code inconsistencies are more likely to be detected.
  • Knowledge sharing is improved within the participants:
    • Small portions can be assimilated better.
  • Better engineering practices are exercised:
    • Solving big problems by dividing them in well contained, smaller problems.
    • Exercising separation of concerns within the code changes.

What can I do to optimize my changes

  • Use the PullRequestQuantifier to quantify your PR accurately
    • Create a context profile for your repo using the context generator
    • Exclude files that are not necessary to be reviewed or do not increase the review complexity. Example: Autogenerated code, docs, project IDE setting files, binaries, etc. Check out the Excluded section from your prquantifier.yaml context profile.
    • Understand your typical change complexity, drive towards the desired complexity by adjusting the label mapping in your prquantifier.yaml context profile.
    • Only use the labels that matter to you, see context specification to customize your prquantifier.yaml context profile.
  • Change your engineering behaviors
    • For PRs that fall outside of the desired spectrum, review the details and check if:
      • Your PR could be split in smaller, self-contained PRs instead
      • Your PR only solves one particular issue. (For example, don't refactor and code new features in the same PR).

How to interpret the change counts in git diff output

  • One line was added: +1 -0
  • One line was deleted: +0 -1
  • One line was modified: +1 -1 (git diff doesn't know about modified, it will
    interpret that line like one addition plus one deletion)
  • Change percentiles: Change characteristics (addition, deletion, modification)
    of this PR in relation to all other PRs within the repository.


Was this comment helpful? 👍  :ok_hand:  :thumbsdown: (Email)
Customize PullRequestQuantifier for this repository.

@iSazonov iSazonov requested a review from JamesWTruher January 30, 2023 05:48
Copy link
Copy Markdown
Member

@SteveL-MSFT SteveL-MSFT left a comment

Choose a reason for hiding this comment

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

Didn't realize we had so many typos! Thanks!

@PaulHigin PaulHigin merged commit d29f34b into PowerShell:master Jan 30, 2023
@iSazonov
Copy link
Copy Markdown
Collaborator

@spaette
PArent -> parent
exceptions's -> exception's
requests's -> request's
espacing -> escaping
Find entires -> Find entries
tell's use what -> tells use what
thexct that -> text that
thext that -> text that
AmbiguousAuthentication and successfulDecompression -> Ok

@iSazonov iSazonov added CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log CL-Docs Indicates that a PR should be marked as a documentation change in the Change Log and removed CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log labels Jan 30, 2023
@ghost
Copy link
Copy Markdown

ghost commented Mar 14, 2023

🎉v7.4.0-preview.2 has been released which incorporates this pull request.:tada:

Handy links:

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

Labels

CL-Docs Indicates that a PR should be marked as a documentation change in the Change Log Extra Small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.