This repository was archived by the owner on Oct 11, 2021. It is now read-only.
(GH-110) Use PSParser.Tokenize#128
Open
gep13 wants to merge 1 commit intochocolatey-archive:masterfrom
Open
Conversation
Member
Author
|
@ferventcoder is this the sort of thing that you were thinking? |
| var tokens = PSParser.Tokenize(contents, out errors); | ||
|
|
||
| var requiredCalls = tokens.Where(p => p.Type != PSTokenType.Comment && | ||
| p.Content.to_lower().Contains("createshortcut") |
Contributor
There was a problem hiding this comment.
I'm not sure I would call it requiredCalls.
Member
Author
There was a problem hiding this comment.
@ferventcoder I just copied what you had here: #110 (comment) I didn't give it much thought in the first pass 😄
Now that I look at it again, in our case, we are looking for methods that shouldn't be called, so yes, requiredCalls doesn't make sense. Perhaps prohibitedCalls. I have no imagination when it comes to naming 😄
ferventcoder
reviewed
Dec 3, 2016
| <Reference Include="System.Management" /> | ||
| <Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||
| <SpecificVersion>False</SpecificVersion> | ||
| <HintPath>..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\WindowsPowerShell\3.0\System.Management.Automation.dll</HintPath> |
Contributor
There was a problem hiding this comment.
Bad hint path here. Reference the shell of SMA in lib.
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Relates to #110