We are pleased to announce the SonarQube C++ Community Plugin version 1.2.0.
See lists below for features added and bugs fixed in this release.
SonarQube compability
- tested and released for SonarQube 6.7 LTS, 7.0, 7.1, 7.2, 7.3, 7.4
see also SonarQube compatibility matrix - Installation Instructions
- Upgrade Instructions
Enhancements
- SQ 7.3 and SQ 7.4 support #1541 #1581
- minimal supported SQ API is 6.7 #1317
- Complexity metrics are performed on original source code now #1547 #1552
- In the past we were first preprocessing the code and were calculating the complexity metrics on base of the preprocessed code. This could lead to confusing metric numbers because macro code is counted multiple times and could also be from external libraries. Generated code (among others macro expansions) doesn't affect the calculation of cognitive / cyclomatic complexity now. This can lead to different but easier to understand metrics.
- GCC and MSVC compiler sensor can be used at the same time now #1533 #1180
- BREAKING CHANGE :
sonar.cxx.compiler
settings are no more supported!- use
sonar.cxx.vc
to read MSVC reports - use
sonar.cxx.gcc
to read GCC reports - use
sonar.cxx.msbuild
to read includes and defines from MSBuild log file
- use
- BREAKING CHANGE :
- implement explanation for cyclomatic and cognitive complexity checks #1494 #1551 #1546 #1537 #1535
- Clang-Tidy 8 support #1536 #1555 #1558 #1566
- Cppcheck 1.85 support #1545 #1576
- make default logging less verbose (move some parts to debug info) #1563 #1565 #1567
- Setting
sonar.cxx.missingIncludeWarnings
is no more available. Turn debug info on to get information.
- Setting
- The naming of the following metrics have been changed, see Upgrade Instructions
- perc_complex_functions -> CXX-PERC_COMPLEX_FUNCTIONS
- loc_in_complex_functions -> LOC_IN_COMPLEX_FUNCTIONS
- perc_loc_in_complex_functions -> CXX-PERC_LOC_IN_COMPLEX_FUNCTIONS
- big_functions -> CXX-BIG_FUNCTIONS
- loc_in_big_functions -> CXX-LOC_IN_BIG_FUNCTIONS
- perc_big_functions -> CXX-PERC_BIG_FUNCTIONS
- perc_loc_in_big_functions -> CXX-PERC_LOC_IN_BIG_FUNCTIONS
- loc_in_functions -> CXX-LOC_IN_FUNCTIONS
- refactoring #1526 #1529 #1530 #1532 #1582 #1562
Bugfixes
- Sensors have problem to import results because of symbolic links and path normalization #1574 #1575
- C++: support alternative operators #1569 #1572 #1577
- MethodName check fails on constructor of nested class #1557 #1559
- API check: Method defined in header file, but out of class, marked as undocumented / Public API: ignore methods outside of class #1543 #1544 #1580
- xUnit sensor not run on maven projects #1523 #1524
- C-Plugin: sensors use wrong rules repository keys / rules repository ignored the language specific repository suffix #1521 #1522
- java.lang.StackOverflowError during parse of source file / protect ExpressionEvaluator from self-referential macros #1516 #1517
- cppcheck sensor: wrong handling of warnings with multiple locations #1511 #1512
- sonar-cxx custom metrics are not displayed/saved #1509 #1514
- enable code metrics for public API
- support multi-module projects
- reduce memory footprint by moving of metric aggregation to the computation engine
- Property 'sonar.cxx.coverage.reportPath' should be made using 'getStringArray' method. The SonarQube plugin using this property should be updated #1384 #1568
- cppcheck.xml fix name and description of unmatchedSuppression #1564
- [Travis/AppVeyor] Updates SQ distribution URL #1571
- cannot find include files #1230
- Symlink support #1574 #1575
Known Issues
For an up to date list of known issues see the issue tracker.
- not compatible with Java 9
- Ensure that a rule is enabled if you get no results. In new SQ versions the default profile is read-only. The cxx plugin does not enable all rules per default.
- Starting with SQ 6.2 there are some new metrics and some are no more available. Please have a look to the SonarQube release notes.
- test execution metrics are not supported
- The Cppcheck plugin is deprecated and not working in parallel to this plugin. This plugin provides an own Cppcheck sensor.
- C plugin and JSON Compilation Database support are experimental only
Thanks ....
go to all contributors (in alphabetical order):
@guwirth
@ivangalkin
@moriarty
@nathanaelg
... and all people which were active on the issue tracker!