Open ThomasNieto opened 1 year ago
Nice idea but you'd need to fix existing tests
I'm not sure why the tests are failing with change as the tests would be using a provided path and not a default.
I will try look into it another time and see whether I can do something about it, definitely before next release, sorry it's taken so long
@ThomasNieto This seems like a good idea to me 🙂
@bergmeister, This fails many of the tests as the path now always has some value. If -ScriptDefinition
is supplied - it's ignored
You should probably make a change to the IsFileParameterSet()
function to instead check that ScriptDefinition doesn't have some value. Or maybe better still return this.ParameterSetName.StartsWith("Path")
.
You will also need to update the markdown help file for Invoke-ScriptAnalyzer
to tell the help system that path is no longer required:
Or you'll get a test failure from Tests\Engine\ModuleHelp.Tests.ps1
Hope that helps 😀!
PR Summary
Removes
Path
as a mandatory parameter and sets the default to the current working directory.Resolves #1887
PR Checklist
.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
to the beginning of the title and remove the prefix when the PR is ready.