Hello Visual Studio community,
The SonarLint version 8.3 of Visual Studio is out!
With this release, a CFamily analyzer update introducing 7 new rules for C++23:
- S7032: init-statement in if/switch/for-range should declare a variable/simple-declaration
- S7033: if consteval should be used instead of if (std::is_constant_evaluated())
- S7034: Use contains on string and string_view instead of find or equivalents
- S7035: Use “to_underlying” to get the value of an enum
- S7038: std::stringstream or std::spanstream should be used instead of std::strstream
- S7040: Escape sequences should use the delimited form ( \u{}, \o{}, \x{})
- S7042: std::views::as_const should be used to prevent modifying range elements
We also updated the C# analyzer that includes promotes 4 rules in the Sonar Way quality profile:
- S4050 Operators should be overloaded consistently
- S2674 The length returned from a stream read should be checked
- S3993 Custom attributes should be marked with “System.AttributeUsageAttribute”
- S4052 Types should not extend outdated base types
In addition, the recent C standard added more features to the language, so you can now add a C standard flag to make the analyzer aware of the used language standard.
Finally, you are now able to add a custom JRE location in the extension menu.
You can find the release notes here.
Thank you for your continued support!
Farah