We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 771ffb6 commit 701c264Copy full SHA for 701c264
Tests/Engine/LibraryUsage.tests.ps1
@@ -78,8 +78,12 @@ function Invoke-ScriptAnalyzer {
78
);
79
80
if ($PSCmdlet.ParameterSetName -eq "File") {
81
- $supportsShouldProcessFunc = [Func[string, string, bool]]{ return $Recurse.IsPresent }
82
- $scriptAnalyzer.AnalyzePath($Path, $supportsShouldProcessFunc, $Recurse.IsPresent);
+ $supportsShouldProcessFunc = [Func[string, string, bool]]{ return $Recurse.IsPresent }
+ if ($Fix.IsPresent)
83
+ {
84
+ return $scriptAnalyzer.AnalyzeAndFixPath($Path, $supportsShouldProcessFunc, $Recurse.IsPresent);
85
+ }
86
+ return $scriptAnalyzer.AnalyzePath($Path, $supportsShouldProcessFunc, $Recurse.IsPresent);
87
}
88
else {
89
return $scriptAnalyzer.AnalyzeScriptDefinition($ScriptDefinition);
0 commit comments