Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Updating User #24

Merged
merged 8 commits into from
Jan 28, 2017
Merged

Updating User #24

merged 8 commits into from
Jan 28, 2017

Conversation

mbreakey3
Copy link
Member

@mbreakey3 mbreakey3 commented Jan 11, 2017

This change is Reviewable

@msftclas
Copy link

Hi @mbreakey3, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (Mariah Breakey). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

@kwirkykat kwirkykat added the needs review The pull request needs a code review. label Jan 20, 2017
@kwirkykat kwirkykat self-requested a review January 20, 2017 00:28
@kwirkykat
Copy link
Member

Reviewed 4 of 6 files at r1.
Review status: 4 of 6 files reviewed at latest revision, 8 unresolved discussions.


DscResources/MSFT_UserResource/MSFT_UserResource.psm1, line 712 at r1 (raw file):

Set-StrictMode -Version Latest

Not needed since this is already turned on for the whole file


DscResources/MSFT_UserResource/MSFT_UserResource.psm1, line 720 at r1 (raw file):

-ErrorAction 'Stop'

Not needed since you have $errorActionPreference = 'Stop' for the whole file.


DscResources/MSFT_UserResource/MSFT_UserResource.psm1, line 742 at r1 (raw file):

return $returnValue

Can you put the return after the catch and assign the hashtable you return in the catch to the same variable so that we have a single point of return?


DscResources/MSFT_UserResource/MSFT_UserResource.psm1, line 849 at r1 (raw file):

-ErrorAction 'Stop'

Not needed


DscResources/MSFT_UserResource/MSFT_UserResource.psm1, line 1031 at r1 (raw file):

Set-StrictMode -Version Latest

Not needed


DscResources/MSFT_UserResource/MSFT_UserResource.psm1, line 1038 at r1 (raw file):

-ErrorAction 'Stop'

Not needed


DscResources/MSFT_UserResource/MSFT_UserResource.psm1, line 1050 at r1 (raw file):

The user is not found

Quoted 8 lines of code… > if ($Ensure -eq 'Absent') > { > return $true > } > else > { > return $false > }

return ($Ensure -eq 'Absent')


Tests/Unit/MSFT_UserResource.Tests.ps1, line 743 at r1 (raw file):

'Should throw an Invalid Operation exception'

When?


Comments from Reviewable

@kwirkykat
Copy link
Member

Reviewed 1 of 6 files at r1.
Review status: 5 of 6 files reviewed at latest revision, 8 unresolved discussions.


Comments from Reviewable

@mbreakey3
Copy link
Member Author

Review status: 5 of 6 files reviewed at latest revision, 8 unresolved discussions.


DscResources/MSFT_UserResource/MSFT_UserResource.psm1, line 1050 at r1 (raw file):

Previously, kwirkykat (Katie Keim) wrote…

The user is not found

        if ($Ensure -eq 'Absent')
        {
            return $true
        }
        else
        {
            return $false
        }

return ($Ensure -eq 'Absent')

?


Comments from Reviewable

@kwirkykat
Copy link
Member

Reviewed 1 of 2 files at r2.
Review status: 5 of 6 files reviewed at latest revision, 1 unresolved discussion.


DscResources/MSFT_UserResource/MSFT_UserResource.psm1, line 1050 at r1 (raw file):

Previously, mbreakey3 (Mariah) wrote…

?

Instead of checking the value of the boolean ($Ensure -eq 'Absent') to return true if it is true and false if is false, you can just return the boolean ($Ensure -eq 'Absent')


Comments from Reviewable

@mbreakey3
Copy link
Member Author

Review status: 5 of 6 files reviewed at latest revision, 1 unresolved discussion.


DscResources/MSFT_UserResource/MSFT_UserResource.psm1, line 1050 at r1 (raw file):

Previously, kwirkykat (Katie Keim) wrote…

Instead of checking the value of the boolean ($Ensure -eq 'Absent') to return true if it is true and false if is false, you can just return the boolean ($Ensure -eq 'Absent')

Done.


Comments from Reviewable

@kwirkykat
Copy link
Member

Reviewed 1 of 1 files at r3.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@kwirkykat
Copy link
Member

:lgtm:


Review status: all files reviewed at latest revision, all discussions resolved, some commit checks pending.


Comments from Reviewable

@mbreakey3 mbreakey3 merged commit 836d329 into PowerShell:dev Jan 28, 2017
@joeyaiello joeyaiello removed the needs review The pull request needs a code review. label Jan 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants