forked from microsoft/PowerShellForGitHub
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Somehow a number of PSScriptAnalyzer issues snuck in. This fixes them. The main PSScriptAnalyzer issues needing to be fixed were: * `PSReviewUnusedParameter` - This one came up a lot due to our heavy usage of `Resolve-RepositoryElements` and `Resolve-ParameterWithDefaultConfigurationValue` which both end up referencing their parameters by grabbing them off the stack. That means that `NoStatus` and `Uri` are frequently never directly referenced. So, exceptions were added. There were two cases (in GitHubAnalytics) where there was a false positive due to PowerShell/PSScriptAnalyzer#1472 * `PSUseProcessBlockForPipelineCommand` - We had a number of functions that took pipeline input, but didn't actuall use the `process` block. This actually caught a bug with `Group-GitHubIssue` and `Group-GitHubPullRequest`. Added correct `process` block usage for most of the functions, but removed pipeline support for those where it didn't actually make sense anymore. * `PSUseDeclaredVarsMoreThanAssignments` - These are false positives in the Pester tests due to the usage of `BeforeAll`. There wasn't an obvious way to use `SuppressMessageAttribute` in the Pester test, so I used a hacky workaround to "use" the variable in the `BeforeAll` block. I could have added the suppression to the top of the file, but I still want to catch real issues in those files later. Also, it turns out that `Group-GitHubPullRequest` hadn't actually been exported, so I fixed that too.
- Loading branch information
1 parent
c4c1ec3
commit 1a9b8ca
Showing
24 changed files
with
329 additions
and
128 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.