Change Compatibility rule logic for finding the module base#1176
Merged
JamesWTruher merged 1 commit intoPowerShell:developmentfrom Mar 15, 2019
Merged
Change Compatibility rule logic for finding the module base#1176JamesWTruher merged 1 commit intoPowerShell:developmentfrom
JamesWTruher merged 1 commit intoPowerShell:developmentfrom
Conversation
… file This is because we might be installed in a versioned directory, rather than the a directory name PSScriptAnalyzer, we'll be in PSScriptAnalyzer/1.18.0
bergmeister
approved these changes
Mar 15, 2019
Collaborator
bergmeister
left a comment
There was a problem hiding this comment.
There's a lot of hard-coding. For a quick-fix before the release it's fine but we should create an item to move the binaries of v5 into it's own folder so that we do not need to have such a logic. Also: we should improve our test setup to deploy PSSA in a named folder
| psmPath = Path.Combine(nonNormalizedRoot, psdFile); | ||
| if ( ! File.Exists(psmPath) ) { | ||
| // Couldn't find it, give up | ||
| return String.Empty; |
Collaborator
There was a problem hiding this comment.
Should we not rather throw? If a user accidentally deletes/moves/rename the file in the installation folder, then we'd have an actionable error message
bergmeister
pushed a commit
to bergmeister/PSScriptAnalyzer
that referenced
this pull request
Mar 22, 2019
… file (PowerShell#1176) This is because we might be installed in a versioned directory, rather than the a directory name PSScriptAnalyzer, we'll be in PSScriptAnalyzer/1.18.0
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 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.
PR Summary
Now hunt for the PSScriptAnalyzer.psd1 file.
This is because we might be installed in a versioned directory, rather than the directory name PSScriptAnalyzer, we might be in PSScriptAnalyzer/1.18.0
PR Checklist
.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.