-
Notifications
You must be signed in to change notification settings - Fork 393
Add rule to check cmdlet compatibility #617
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
Conversation
1418841
to
36fe25a
Compare
throw new ArgumentNullException("ast"); | ||
} | ||
|
||
scriptPath = fileName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fileName [](start = 25, length = 8)
Any possibility of this being null or whitespace? or not existing file?
|
||
Function IsPSEditionDesktop | ||
{ | ||
$PSEdition -eq $null -or $PSEdition -eq 'Desktop' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$PSEdition -eq $null -or $PSEdition -eq 'Desktop' [](start = 4, length = 49)
use below here
(Get-PSVariable -Name PSEdition -ErrorAction Ignore) -or ($PSEdition -eq 'Desktop')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it Get-Variable or Get-PSVariable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it should be Get-Variable only. Thanks!
{ | ||
$null | ||
} | ||
$root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use below
if ((Test-Path (Join-Path $root $solutionFilename)))
{
$root
}
{ | ||
$null | ||
} | ||
Join-Path $slnRoot "Rules" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use below
if ($slnRoot)
{
Join-Path $slnRoot "Rules"
}
{ | ||
$null | ||
} | ||
Join-Path $prjRoot "ScriptAnalyzerBuiltinRules.csproj" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the above suggestion here too.
|
@bmanikm Thanks! |
ad039ae
to
7406fc0
Compare
7406fc0
to
8adbda8
Compare
Resolves #605
This change is