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 S1168: Empty arrays and collections should be returned instead of null #916

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

Address S1168: Empty arrays and collections should be returned instead of null #916

bart-vmware opened this issue Jul 28, 2022 · 0 comments · Fixed by #1334 or #1347
Labels
Type/code-quality Issue that affects code quality Warn/breaking-change There is a breaking change in the code

Comments

@bart-vmware
Copy link
Member

bart-vmware commented Jul 28, 2022

Address existing violations of Address S1168: Empty arrays and collections should be returned instead of null in the codebase and set severity to Warning in Steeltoe.Debug.ruleset and Steeltoe.Release.ruleset.

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:

  • Fix the violation by changing the code to not violate the rule
  • Suppress the violation in code using #pragma warning disable/restore, preceded by a justification comment if not obvious

Related to #941 and #946.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type/code-quality Issue that affects code quality Warn/breaking-change There is a breaking change in the code
Projects
None yet
1 participant