Clean up CodeFactor style issues coming in commits for the last month#10591
Clean up CodeFactor style issues coming in commits for the last month#10591iSazonov merged 5 commits intoPowerShell:masterfrom
Conversation
|
@iSazonov Can you clean up the title to say what you changed. The fact that the last commit caused issues should go in the PR context |
|
@TravisEz13 I hope I addressed your request, otherwise please do this for me. |
| else if (rawIntValue == 0) | ||
| { | ||
| propertyValue = false; | ||
| } |
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. 🙂
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; | ||
| } |
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;|
🎉 Handy links: |
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.