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

Cleanup & update ErrorRecord class code style #9021

Merged
merged 4 commits into from Mar 6, 2019

Conversation

@vexx32
Copy link
Contributor

commented Mar 1, 2019

PR Summary

Cleanup and update ErrorRecord class code style & improve consistency of style across the class.

There are no functional changes to this PR; everything is purely code-style-related. Some private properties were ditched entirely, being easily replaced with simple auto-properties (i.e., they just had a straightforward get/set anyway, and the extra code was adding complexity and nothing else).

PR Context

After speaking with @SteveL-MSFT on Twitter, I intend to implement a Suggestion property to ErrorRecord to replace the current Suggestions system.

Before that, I would like to clean up the ErrorRecord class first.

PR Checklist

@vexx32 vexx32 requested review from BrucePay and daxian-dbw as code owners Mar 1, 2019

@@ -1071,13 +1074,7 @@ public virtual void GetObjectData(SerializationInfo info, StreamingContext conte
/// Is this instance serialized.
/// </summary>
/// <value></value>

This comment has been minimized.

Copy link
@iSazonov

iSazonov Mar 4, 2019

Collaborator

Is the tag mandatory? Can we remove it?

This comment has been minimized.

Copy link
@vexx32

vexx32 Mar 4, 2019

Author Contributor

I think it's just automatically added by VS when adding comment XML. I'll remove it. :)

@vexx32 vexx32 changed the title :recycle: Cleanup & update ErrorRecord class code style Cleanup & update ErrorRecord class code style Mar 4, 2019

@vexx32

This comment has been minimized.

Copy link
Contributor Author

commented Mar 4, 2019

@iSazonov there were a few instances where we could use nameof() and a few of the empty <value></value> XML tags, so I fixed them all. 🙂

@iSazonov iSazonov self-assigned this Mar 6, 2019

@iSazonov iSazonov merged commit cd4b194 into PowerShell:master Mar 6, 2019

7 of 8 checks passed

Codacy/PR Quality Review Not up to standards. This pull request quality could be better.
Details
CodeFactor 37 issues fixed. 3 issues found.
Details
PowerShell-CI-linux #PR-9021-20190304.02 succeeded
Details
PowerShell-CI-macos #PR-9021-20190304.02 succeeded
Details
PowerShell-CI-static-analysis #PR-9021-20190304.02 succeeded
Details
PowerShell-CI-windows #PR-9021-20190304.02 succeeded
Details
WIP Ready for review
Details
license/cla All CLA requirements met.
Details

@vexx32 vexx32 deleted the vexx32:Style/ErrorRecord branch Mar 6, 2019

RDIL pushed a commit to RDIL/PowerShell that referenced this pull request Mar 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.