Continuous Inspection

SonarLint for Visual Studio 2.7 Released

SonarSource is pleased to announce the release of SonarLint for Visual Studio version 2.7.

In this version, the symbolic execution engine for C# was improved to better handle expressions of value types and 30 new VB.NET rules are available :

  • Identical expressions should not be used on both sides of a binary operator – Rule S1764
  • Two branches in the same conditional structure should not have exactly the same implementation – Rule S1871
  • Variables should not be self-assigned – Rule S1656
  • Related “If/ElseIf” statements should not have the same condition – Rule S1862
  • Functions should not be too complex – Rule S1541
  • Expressions should not be too complex – Rule S1067
  • Files should not have too many lines – Rule S104
  • Lines should not be too long – Rule S103
  • “With” statements should be used for a series of calls to the same object – Rule S2375
  • Comments should not be located at the end of lines of code – Rule S139

And a bunch of rules to enforce naming conventions:

  • Namespace names should comply with a naming convention – Rule S2304
  • Class names should comply with a naming convention – Rule S101
  • Interface names should comply with a naming convention – Rule S114
  • Method parameters should follow a naming convention – Rule S1654
  • Generic type parameter names should comply with a naming convention – Rule S2373
  • Indexed properties should be named “Item” – Rule S2353
  • Function names should comply with a naming convention – Rule S1542
  • Properties should comply with a naming convention – Rule S2366
  • Enumeration types should comply with a naming convention – Rule S2342
  • Enumeration values should comply with a naming convention – Rule S2343
  • Event handlers should comply with a naming convention – Rule S2347
  • Events should comply with a naming convention – Rule S2348
  • Non-private constants should comply with a naming convention – Rule S2367
  • Private constants should comply with a naming convention – Rule S2362
  • Local variable and function parameter names should comply with a naming convention – Rule S117
  • Non-private “Shared ReadOnly” fields should comply with a naming convention – Rule S2370
  • “Private Shared ReadOnly” fields should comply with a naming convention – Rule S2363
  • Non-private fields should comply with a naming convention – Rule S2369
  • “Private” fields should comply with a naming convention – Rule S2364

If you have any feedback or any idea of new rules, feel free to join the SonarLint Google Group.

Have fun with SonarLint for Visual Studio!