-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Improve preprocessor #2579
Merged
ChrisTitusTech
merged 15 commits into
ChrisTitusTech:main
from
og-mrk:improve-preprocessor
Sep 10, 2024
Merged
Improve preprocessor #2579
ChrisTitusTech
merged 15 commits into
ChrisTitusTech:main
from
og-mrk:improve-preprocessor
Sep 10, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…es - Improve implementation for 'Invoke-Preprocessing' Script Tool
Thanks @og-mrk for fixing this :) |
Real-MullaC
approved these changes
Aug 21, 2024
…reprocessing.ps1' Script Tool
8 tasks
ChrisTitusTech
force-pushed
the
main
branch
2 times, most recently
from
August 26, 2024 22:01
7805fe4
to
cfb9edb
Compare
og-mrk
force-pushed
the
improve-preprocessor
branch
from
August 31, 2024 06:51
b3be4b6
to
d65bac4
Compare
…Script" This reverts commit 674ab03.
ChrisTitusTech
approved these changes
Sep 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Type of Change
Description (Highlighted Changes)
Push-Location
&Pop-Location
instead of 'workingdir', which'll deduplicate a lot of un-needed pre-fixes when dealing with paths, it's a nice & simple approach to this problem.. can't remember which repo I found it 😅.. but hay, here it is.Invoke-Preprocessing
script, now it actually excludes files that it shouldn't be processing.Invoke-Preprocessing
works as intended! (SeeAdditional Information
for more info about this "mis-behaving" RegEx)needed to rethink what it should be looking for.. and again, this RegEx approach is "good enough" for now, it's better in the long-run to parse & make AST for every powershell script file.
Testing
Ran the compiled
winutil.ps1
file, as well as throughCompile.ps1 -Run
, both worked as expected.Impact
this PR won't have that impact to end-user, nor will it (hopefully) impact other open PRs.. not sure on the later part.
Additional Information
Description
is referring to last RegEx in the list, which'll remove the whitespace between type cast & variable name, like[string] $MyString
->[string]$MyString
, see screenshot below for more context.Click to Expand
Checklist