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

Address S4487: Unread "private" fields should be removed #954

Closed
bart-vmware opened this issue Jul 28, 2022 · 0 comments · Fixed by #1049
Closed

Address S4487: Unread "private" fields should be removed #954

bart-vmware opened this issue Jul 28, 2022 · 0 comments · Fixed by #1049
Labels
Type/bug Something isn't working Type/code-quality Issue that affects code quality

Comments

@bart-vmware
Copy link
Member

Address existing violations of S4487: Unread "private" fields should be removed in the codebase and set severity to Info in Steeltoe.Debug.ruleset and to Warning in Steeltoe.Release.ruleset.

Note: The difference in severities between Debug/Release is to avoid distraction or hindrance while writing/debugging code.

To find existing violations, enable the rule (see above) and rebuild src/Steeltoe.All.sln to make them appear in the Output window.

To address the violations, choose from the following on a case-by-case basis:

  • Remove the field and its assignments
  • Add code that reads the field
  • Suppress the violation in code using #pragma warning disable/restore, preceded by a justification comment if not obvious
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type/bug Something isn't working Type/code-quality Issue that affects code quality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant