GNAT Static Analysis Suite (previously known as CodePeer) 23 Release Notes¶
We present here a few highlights of the new features in GNAT SAS 23. You can access the complete list here.
Renaming¶
The bundle previously known as CodePeer is now named the GNAT Static Analysis Suite, or GNAT SAS. It is aimed at bundling together tools performing static verification and analysis on Ada source code. The main components of this package in the 23 release are CodePeer for bug finding and vulnerability analysis, GNATcheck for coding standard checking and GNATmetric for metric computations.
New GNATcheck engine with customization capabilities¶
GNATcheck has been rewritten using libadalang. As a consequence, it’s now much more flexible and can be used even on uncompilable code. In addition, it is integrated with LKQL, the LangKit Query Language, which allows users to develop their own custom checkers.
New GNATcheck rules¶
Anonymous_Access
Boolean_Negations
Deeply_Nested_Instantiations
End_Of_Line_Comments
Explicit_Inlining
Headers
Integer_Types_As_Enum
Maximum_Expression_Complexity
Maximum_Lines
Maximum_Out_Parameters
Maximum_Subprogram_Lines
Membership_For_Validity
Min_Identifier_Length
No_Others_In_Exception_Handlers
Non_Component_In_Barriers
Numeric_Format
Numeric_Literals
Same_Instantiations
Separates
Too_Many_Generic_Dependencies
Uncommented_BEGIN
Use_Array_Slices
Use_Case_Statements
Use_For_Loops
Variable_Scoping
See GNATcheck documentation for more details.
Improvements in CodePeer level 0¶
CodePeer level 0, which uses the Infer tool, has been enhanced to better support access-to-subprogram parameters, pointer dereferences, and variables used in conditionals and controlled types. Additional Ada concepts are also now treated, in particular named array aggregates. Handling of object initialization according to its type default values.