libplanet icon indicating copy to clipboard operation
libplanet copied to clipboard

Remove Sonar Analyzer suppressions

Open earlbread opened this issue 5 years ago • 15 comments

We need to remove Sonar Analyzer suppressions.

  • [x] S927: Rename parameter 'A' to 'B' to match the interface declaration.
  • [x] S1066: Merge this if statement with the enclosing one.
  • [x] S1118: Add a 'protected' constructor or the 'static' keyword to the class declaration.
  • [x] S1125: Remove the unnecessary Boolean literal(s).
  • [x] S1450: Remove the field '_bucketSize' and declare it as a local variable in the relevant methods.
  • [ ] S1481: Remove the unused local variable 'x'.
  • [x] S2234: Parameters to 'Equal' have the same names but not the same order as the method arguments.
  • [x] S3358: Extract this nested ternary operation into an independent statement.
  • [x] S3442: Change the visibility of this constructor to 'protected'.
  • [x] S4035: Seal class or implement 'IEqualityComparer<T>' instead.
  • [x] S4201: Remove this unnecessary null check; 'is' returns false for nulls.

earlbread avatar Nov 11 '19 09:11 earlbread

I want to do deleting suppression S927

hmc0105 avatar Nov 12 '19 06:11 hmc0105

We suppressed S1128 warnings too here and there in order to work around the bug https://github.com/SonarSource/sonar-dotnet/issues/2694, but now it seems fixed (https://github.com/SonarSource/sonar-dotnet/pull/2798). So we should restore these suppressed warnings now.

dahlia avatar Nov 21 '19 11:11 dahlia

I'm going to work on S1066

Oaroomy avatar Dec 14 '19 02:12 Oaroomy

I'm going to work on S1118

Oaroomy avatar Dec 14 '19 07:12 Oaroomy

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Feb 13 '20 08:02 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Apr 13 '20 08:04 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Jun 12 '20 20:06 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Aug 23 '20 04:08 stale[bot]

I'm going to work on the remaining surpressions here.

stylesm avatar Sep 30 '20 17:09 stylesm

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Dec 19 '20 13:12 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Apr 16 '22 01:04 stale[bot]

~~Seems to have been resolved already.~~ ~~All checklists are marked except S1481, and when I opened Libplanet.ruleset, could find lines below.~~

    <!-- Remove the unused local variable 'x'. -->
    <Rule Id="S1481" Action="None" />

Misunderstood the issue target

OnedgeLee avatar Aug 21 '22 05:08 OnedgeLee

sindydwns avatar Aug 21 '22 06:08 sindydwns