Add recursion and folder handling for Get-AstScript
#21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request includes several changes to the
Get-AstScript
function insrc/functions/public/Core/Get-AstScript.ps1
to enhance its functionality, and the addition of new sample scripts for testing. The most important changes include updating the parameter handling to support multiple paths and recursive directory processing, as well as updating the tests accordingly.Enhancements to
Get-AstScript
function:Get-AstScript
function documentation to illustrate usage with multiple paths and recursive directory processing.Path
parameter to accept an array of strings and added aRecurse
switch parameter for recursive directory processing.process
block to handle directories and files appropriately, including recursive processing of directories.Updates to tests:
tests/AST.Tests.ps1
to streamline the testing process.New sample scripts for testing:
TestScript1.ps1
to test a function with a string parameter.TestScript2.ps1
to test a function with an integer parameter.TestScript3.ps1
to test a function with a boolean parameter.Type of change
Checklist