Skip to content
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

MSFT_xGroupResource.psm1: Fix Script Analyzer Issues #485

Closed
mhendric opened this issue Jan 27, 2019 · 1 comment · Fixed by #508
Closed

MSFT_xGroupResource.psm1: Fix Script Analyzer Issues #485

mhendric opened this issue Jan 27, 2019 · 1 comment · Fixed by #508
Assignees
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.

Comments

@mhendric
Copy link
Contributor

Details of the scenario you tried and the problem that is occurring

There's a number of script analyzer issues getting reported in MSFT_xGroupResource.psm1. These should be fixed.

Verbose logs showing the problem

[00:03:57]     Context MSFT_xGroupResource.psm1
[00:03:58]       [+] Should pass all error-level PS Script Analyzer rules 118ms
[00:04:04]       [+] Should pass all required PS Script Analyzer rules 6.4s
[00:04:05]       [+] Should pass all flagged PS Script Analyzer rules 1.19s
[00:04:05]       [+] Should pass any recently-added, error-level PS Script Analyzer rules 87ms
[00:04:09]       [+] Should not suppress any required PS Script Analyzer rules 3.08s
[00:04:10] Custom DSC Resource Kit PSSA rule(s) did not pass.
[00:04:10] The following PSScriptAnalyzer rule 'DscResource.AnalyzerRules\Measure-ParameterBlockParameterAttribute' errors need to be fixed:
[00:04:10] MSFT_xGroupResource.psm1 (Line 99): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 191): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 195): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 198): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 201): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 204): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 207): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 289): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 293): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 296): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 299): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 302): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 305): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 346): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 414): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 511): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 515): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 518): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 521): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 524): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 527): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 862): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 866): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 869): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 872): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 875): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 878): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 1095): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 1099): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 1102): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 1105): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 1108): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 1111): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 1356): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 1360): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 1363): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 1366): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 1369): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 1372): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 1574): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 1659): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 1836): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 1925): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 2064): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] MSFT_xGroupResource.psm1 (Line 2332): A [Parameter()] attribute must be the first attribute of each parameter and be on its own line. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#correct-format-for-parameter-block
[00:04:10] For instructions on how to run PSScriptAnalyzer on your own machine, please go to https://github.com/powershell/PSScriptAnalyzer
[00:04:10] Common Tests - Custom Script Analyzer Rules will not fail unless you opt-in.
[00:04:10] To opt-in, create a '.MetaTestOptIn.json' at the root
[00:04:10] of the repo in the following format:
[00:04:10] [
[00:04:10]      "Common Tests - Custom Script Analyzer Rules"
[00:04:10] ]
[00:04:10]       [+] Should pass all custom DSC Resource Kit PSSA rules 1.05s

Version of the DSC module that was used ('dev' if using current dev branch)

dev

@mhendric mhendric added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. labels Jan 27, 2019
@PlagueHO PlagueHO self-assigned this Jan 28, 2019
@PlagueHO
Copy link
Member

I'll grab this one.

mhendric added a commit that referenced this issue Feb 3, 2019
Correct Style Guideline violation in xGroup - Fixes #485
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants