-
Notifications
You must be signed in to change notification settings - Fork 17
Fix most PSScriptAnalyzer issues #27
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
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #27 +/- ##
=======================================
Coverage 26.08% 26.08%
=======================================
Files 3 3
Lines 92 92
=======================================
Hits 24 24
Misses 68 68
Continue to review full report at Codecov.
|
FYI, I'm done pushing changes on this one. This should be ready for review when someone gets to it. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 6 of 6 files at r1.
Reviewable status: 2 of 6 files reviewed, 3 unresolved discussions (waiting on @athaynes and @mhendric)
README.md, line 115 at r1 (raw file):
* *Identity:Not actually used, so could be anything * AllowClear:Indicates that the provisioning process clears the TPM, if necessary, to move the TPM closer to complying with Windows Server? 2012 standards
why the question mark?
DSCResources/MSFT_xBLAutoBitlocker/MSFT_xBLAutoBitlocker.psm1, line 368 at r1 (raw file):
#First get all Bitlocker Volumes of type Data $allBlvs = Get-BitLockerVolume | Where-Object -FilterScript {$_.VolumeType -eq "Data"}
Not really an issue, but if you don't have a variable, you don't need double quotes.
Test/Test-xBitlocker.ps1, line 104 at r1 (raw file):
function RunTest { param([string]$TestName, [string[]]$ModulesToImport, [Hashtable]$Parameters)
This function does not conform to style guides. This is my first time to look at this module, but do the standard test templates not work for this module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 6 files reviewed, 3 unresolved discussions (waiting on @athaynes)
README.md, line 115 at r1 (raw file):
Previously, athaynes (Adam Haynes) wrote…
why the question mark?
This was originally a 'Registered Trademark' symbol, but running the metafixer ConvertTo-ASCII seems to have changed it to a ?. It's probably best to have neither. I will drop it entirely.
DSCResources/MSFT_xBLAutoBitlocker/MSFT_xBLAutoBitlocker.psm1, line 368 at r1 (raw file):
Previously, athaynes (Adam Haynes) wrote…
Not really an issue, but if you don't have a variable, you don't need double quotes.
This line wasn't actually changed for this PR, but I agree, Double Quotes aren't necessary here, and go against the DSC style guidelines. At some point this will need to be fixed as part of an effort to make this a High Quality Resource Module, but I will leave that for another PR. I'll open an Issue to track this.
Test/Test-xBitlocker.ps1, line 104 at r1 (raw file):
Previously, athaynes (Adam Haynes) wrote…
This function does not conform to style guides. This is my first time to look at this module, but do the standard test templates not work for this module?
This is the original integration test file which was created well before this module went open source. The file should probably be removed entirely once similar Integration or Unit tests have been added. I'll open an Issue to track getting everything in this file moved to appropriate templates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 6 files reviewed, 3 unresolved discussions (waiting on @athaynes)
README.md, line 115 at r1 (raw file):
Previously, mhendric (Mike Hendrickson) wrote…
This was originally a 'Registered Trademark' symbol, but running the metafixer ConvertTo-ASCII seems to have changed it to a ?. It's probably best to have neither. I will drop it entirely.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r2, 1 of 1 files at r3.
Reviewable status:complete! all files reviewed, all discussions resolved
Pull Request (PR) description
Fixes most PSScriptAnalyzer issues for the module. Note that I'm unsure why the 3 .psm1 files are showing in GitHub that the whole file was changed. I suspect that this has to do with a recent change to .gitattributes, but am not positive. Looks like they show up correctly in Reviewable though.
PSScriptAnalyzer Before:
PSScriptAnalyzer After:
Task list
Entry should say what was changed, and how that affects users (if applicable).
and comment-based help.
This change is