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 4 commits into from Mar 6, 2019


Copy link

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 Mar 4, 2019


Is the tag mandatory? Can we remove it?

This comment has been minimized.

Copy link

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


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.
CodeFactor 37 issues fixed. 3 issues found.
PowerShell-CI-linux #PR-9021-20190304.02 succeeded
PowerShell-CI-macos #PR-9021-20190304.02 succeeded
PowerShell-CI-static-analysis #PR-9021-20190304.02 succeeded
PowerShell-CI-windows #PR-9021-20190304.02 succeeded
WIP Ready for review
license/cla All CLA requirements met.

@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
None yet
3 participants
You can’t perform that action at this time.