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

In the 6th code block on the page $file seem to be unused #197

Closed
ybeltrikov opened this issue Jan 23, 2024 · 2 comments
Closed

In the 6th code block on the page $file seem to be unused #197

ybeltrikov opened this issue Jan 23, 2024 · 2 comments
Labels
needs-triage Waiting - Needs triage

Comments

@ybeltrikov
Copy link
Contributor

Type of issue

Typo

Feedback

In the code $file is defined but never used:
[string]$file = $MyInvocation.MyCommand.Definition

We possibly need to add it to the ArgumentList:

$objParams = @{
  TypeName = 'Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.CorrectionExtent'
  ArgumentList = $startLineNumber, $endLineNumber, $startColumnNumber,
                 $endColumnNumber, $correction, $file, $optionalDescription
}

Page URL

https://learn.microsoft.com/en-us/powershell/utility-modules/psscriptanalyzer/create-custom-rule?view=ps-modules&source=docs

Content source URL

https://github.com/MicrosoftDocs/PowerShell-Docs-Modules/blob/main/reference/docs-conceptual/PSScriptAnalyzer/create-custom-rule.md

Author

@sdwheeler

Document Id

ea102f70-2dbc-92a0-014f-967097599adf

@ybeltrikov ybeltrikov added the needs-triage Waiting - Needs triage label Jan 23, 2024
@ybeltrikov
Copy link
Contributor Author

Raised PR GH-198

@michaeltlombardi
Copy link
Contributor

Resolved by #198

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Waiting - Needs triage
Projects
None yet
Development

No branches or pull requests

2 participants