{{ message }}
Clean up CodeFactor style issues coming in commits for the last month#10591
Merged
iSazonov merged 5 commits intoPowerShell:masterfrom Sep 28, 2019
Merged
Clean up CodeFactor style issues coming in commits for the last month#10591iSazonov merged 5 commits intoPowerShell:masterfrom
iSazonov merged 5 commits intoPowerShell:masterfrom
Conversation
SteveL-MSFT
approved these changes
Sep 23, 2019
Member
Collaborator
Author
|
@TravisEz13 I hope I addressed your request, otherwise please do this for me. |
vexx32
reviewed
Sep 28, 2019
| else if (rawIntValue == 0) | ||
| { | ||
| propertyValue = false; | ||
| } |
Collaborator
There was a problem hiding this comment.
This is a fairly straightforward bit of logic; perhaps it might be a bit tidier here using ternary syntax?
propertyValue = rawIntValue == 1 ? true : false;Unless there's actually a third possible outcome here, but that seems like something that isn't handled here anyway. 🙂
Collaborator
Author
There was a problem hiding this comment.
@vexx32 Thanks! You are right but no code changes is in the PR, only formatting. I don't want second review round in the simple style PR.
| else | ||
| { | ||
| return true; | ||
| } |
Collaborator
There was a problem hiding this comment.
We could just return the result of the boolean expression in the if statement here if we invert the condition. 🙂
return peekResult != -1;
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
Fix style issues in commits for last month. Only formatting changes, no code changes.
PR Context
Most of merged commits has no style issues in CodeFactor reports but sometimes we pass some style issues to speed up code review and focus on functional changes so we have to fix them from time to time.
CodeFactor statistics says that we fix up to 780 style issues in last month and add 98 new ones. Good trend!
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.