The SonarSource team is pleased to announce the release of the C/C++/Objective-C plugin version 3.8. This new version brings the ability to analyse header files and report issues on them. As trivial as this might sound, the only way to precisely report issues on headers files is to analyse them part of global analysis of *.cpp files directly or indirectly them.
Moreover, the following 9 new rules mainly targeting those header files and so benefiting from this feature are available:
- Binary operators should be overloaded as “friend” functions (see description)
- Classes with “virtual” methods should have “virtual” destructors (see description)
- Structures should not have too many fields (see description)
- Field names should comply with a naming convention (see description)
- Classes should not be derived from virtual bases (see description)
- “const” references to numbers should not be made (see description)
- Classes should not have too many methods (see description)
- “operator delete” should be written along with “operator new” (see description)
- “using” directives should not be used in header files (see description)
Please, read the release notes for more information. You can install or update it via the Update Center.