SonarSource is pleased to announce the release of the C# plugin version 5.0.
Using this 5.0 version is a pre-requisite to activate the “Connected Mode” of SonarLint for Visual Studio 2.0. Moreover by embedding the latest version of the SonarAnalyzer for C#, this version provides 17 new rules :
- Interfaces with colliding, inherited members should explicitly redefine interface members
- Type examining methods should be avoided on “System.Type” instances
- Inappropriate casts should not be made
- Optional parameters should be passed to “base” calls
- Non-flags enums should not be used in bitwise operations
- “[DefaultValue]” should not be used when “[DefaultParameterValue]” is meant
- Right operands of shift operators should be integers
- Limit nesting depth of control flow statements in functions
- Redundant property names should be omitted in anonymous classes
- Declarations and initializations should be as concise as possible
- “==” should not be used when “Equals” is overridden
- Parameters with “[DefaultParameterValue]” attributes should also be “[Optional]“
- “[Optional]” should not be used with “ref” or “out”
- Optional parameters should have the same default value in overrides
- Result of integer division should not be assigned to floating point variable
- “default” clause of a “switch” should not be empty
- Implementations should be provided for “partial” methods
Please read the release notes for more information. You can install or update the C# plugin via the Update Center.
Documentation is available on the product page.