Group 8: Constants

The custom rules 8.x in Polyspace® enforce naming conventions for constants. For information on how to enable these rules, see Check custom rules (-custom-rules). These rules do not apply to constants that are defined within a class or to constants that are function parameters.

NumberRule AppliedOther details
8.1All global nonstatic constants must follow the specified pattern.A global nonstatic constant is a constant with external linkage.
8.2All global static constants must follow the specified pattern.A global static constant is a constant with internal linkage.
8.3All local nonstatic constants must follow the specified pattern.A local nonstatic constant is a constant without linkage.
8.4All local static constants must follow the specified pattern.A local static constant is a constant declared static in a function.