Build Notes (1107) - 23 Jun 2022


  • Import: Fix failure to recognize MSVC style language standard flag in compile_commands.json and build watcher import

Interactive Reports

  • Ireport: Fix sort order inconsistencies for Python IReports
  • Plugin: Fix crash on some Perl IReport plugins

Python API

  • Plugin: Add the script directory to the module search path when loading Python plugin scripts

C++ Strict

  • Add support for analyzing CUDA files (.cu and .cuh) with the C++ (Strict) analyzer

Language - C#

  • Added 'implicit', 'explicit', and 'operator' to the AdditionalKinds freetext for methods. Removed 'operator-' from the name of type cast operators.
  • Added 'partial' to the AdditionalKinds text for partial classes.

CodeCheck Checks

  • C and C++
    • Comments
      • CPP_CM003: Add new: Class headers shall include short description
    • Constructors
      • CPP_C054: Added new: when a deep copy constructor is not implemented, the class header shall describe this fact
    • Declarations and Definitions
      • CPP_DD006: Added new: initializer lists shall be written in order in which they are declared
      • CPP_DD007: Add check "Use private keyword in class definitions"
    • Destructors
      • CPP_D076: Added new: If a class requires a virtual destructor but has nothing to undo from a constructor, an empty implementation should be provided for the destructor as follows
    • Exception Handling
      • CPP_EH000: Added new: Library objects shall not generate error messages directly
    • Functions
      • CPP_F060: Added new: A method that does not change the visible properties of a class shall be declared const
      • CPP_F061: Added new: The type of the return and all method arguments (even type void) shall be specified when defining a method.
      • CPP_F062: Added new: When overloading standardized operators (e.g., a += b, a-=b etc.), the resulting behavior should remain consistent with the expected outcome of the operator.
    • Headers
      • CPP_H017: Add check "No member declarations on the same line"
      • CPP_H017: Add check "Use C++ version of standard headers"
      • CPP_H018: Added new: When including C Standard Library header files, C++ Standard Library header files without a ‘.h’ appended should be used.
    • Identifiers
      • CPP_I025: Added new: The using namespace directive should be used only at the method/function scope.
    • Memory Allocation
      • CPP_M010: Added new: The new[] and delete[] operators shall be used for the allocation and deallocation of memory resources
      • CPP_M011: Added new: The delete[] operator shall be used to deallocate arrays that have been allocated with the new[] operator
      • CPP_M012: Added new: The delete[] operator shall be called in the destructor for all member pointers in an object that are pointing to memory that was dynamically allocated by that object
      • CPP_M013: Added new: user shall provide copy constructor, desctructor, and assignment operator for class using dynamic memory alloc
    • Styling
      • CPP_ST030: Added new: Class design should include the following format
      • CPP_ST031: Add check "No member declarations on the same line"
    • Variables
      • CPP_V029: Added new: The const_cast operator should be used exclusively for altering the constness attribute of a variable.
      • CPP_V030: Added new: The dynamic_cast operator should be used exclusively for casting within an inheritance hierarchy.
      • CPP_V031: Added new: The static_cast operator should be used for routine cast operations not provided by const_cast and dynamic_cast.
      • CPP_V032: Added new: Use of the reinterpret_cast operator should be avoided.
      • CPP_V033: Added new: Typedef'd variables in a class shall be placed in an include file
      • CPP_V034: Added new: STL containers (vector, list, map, etc.) should be used instead of C-style arrays whenever possible.
    • Virtual Functions
      • CPP_VF000: Added new: When implementing virtual functions, every class that contains virtual functions shall provide a virtual destructor.
      • CPP_VF001: Added new: Access levels should not be mixed (public, protected, private) when overriding virtual functions.
    • Warning 
      • Add new: Division of array size of operators