CodeCheck Documentation
CodeCheck Documentation - SciTools' Recommended Checks

Standard: SciTools' Recommended Checks

This collection of standards identifies the violations we feel are the greatest hindrance to code safety, readability, best practice and maintainability.

The majority of these checks appear in one form or another in published best practices and generally accepted coding standards.

You can use these checks to get an idea of how cluttered or brilliant the code base is. You might use them as a basis for developing your own standards. Or you can ignore this collection completely and test your code against a published coding standard or select your own checks from the "All Checks" library.

If you can't find the checks you want here, we would be happy to help you develop checks to match your standards. Just send us an email at [email protected].

Check IDCheck NameSupportedCategorySeverity
CPP_CT_BUGPRONE_ASSERT_SIDE_EFFECTAssert Side EffectYesHigh
CPP_CT_BUGPRONE_BRANCH_CLONEBranch CloneYesHigh
CPP_CT_BUGPRONE_COPY_CONSTRUCTOR_INITCopy Constructor InitYesHigh
CPP_CT_BUGPRONE_INFINITE_LOOPInfinte LoopYesHigh
CPP_CT_BUGPRONE_MACRO_REPEATED_SIDE_EFFECTSMacro Side EffectsYesHigh
CPP_CT_BUGPRONE_NOT_NULL_TERMINATED_RESULTMissing Null TerminatorYesHigh
CPP_CT_BUGPRONE_REDUNDANT_BRANCH_CONDITIONRedundant ConditionYesHigh
CPP_CT_READABILITY_DELETE_NULL_POINTERDelete Null PointerYesHigh
CPP_CT_READABILITY_REDUNDANT_CASTINGRedundant CastYesHigh
CPP_SA_DANGLING_POINTERSDangling PointerYesHigh
CPP_SA_DIV_ZERODivision by ZeroYesHigh
CPP_SA_LEAKSMemory LeakYesHigh
CPP_SA_NULL_PTRNull Pointer DereferenceYesHigh
CPP_SA_STACK_ADDRESS_ESCAPEStack Address EscapeYesHigh
CPP_SA_UNDEFINED_CALLUndefined CallYesHigh
CPP_SA_UNINITIALIZEDUninitialized ValueYesHigh
CPP_SA_VIRTUAL_CALLSVirtual CallYesHigh
CPP_WARN_ADDRESS_OF_TEMPORARYDo Not Take the Address of Temporary ObjectsYesHigh
CPP_WARN_ARRAY_BOUNDSArray BoundsYesHigh
CPP_WARN_AVAILABILITYAvailability AttributeYesHigh
CPP_WARN_BACKSLASH_NEWLINE_ESCAPEBackslash Newline EscapeYesHigh
CPP_WARN_BITFIELD_CONSTANT_CONVERSIONBitfield Constant ConversionYesHigh
CPP_WARN_BITFIELD_WIDTHDo Not Exceed Bit-Field WidthYesHigh
CPP_WARN_BOOL_CONVERSIONBool ConversionYesHigh
CPP_WARN_BUILTIN_MACRO_REDEFINEDBuiltin Macro RedefinedYesHigh
CPP_WARN_BUILTIN_MEMCPY_CHK_SIZEBuiltin Memcpy Check SizeYesHigh
CPP_WARN_CALL_TO_PURE_VIRTUAL_FROM_CTOR_DTORCall to Pure Virtual from Constructor or DestructorYesHigh
CPP_WARN_CAST_QUAL_UNRELATEDCast Qualifiers UnrelatedYesHigh
CPP_WARN_CLASS_CONVERSIONClass ConversionYesHigh
CPP_WARN_COMPARE_DISTINCT_POINTER_TYPESCompare Distinct Pointer TypesYesHigh
CPP_WARN_COMPOUND_TOKEN_SPLIT_BY_MACROCompound Token Split by MacroYesHigh
CPP_WARN_CONDITIONAL_TYPE_MISMATCHConditional Type MismatchYesHigh
CPP_WARN_CONSTANT_CONVERSIONConstant ConversionYesHigh
CPP_WARN_CONSTANT_LOGICAL_OPERANDConstant Logical OperandYesHigh
CPP_WARN_CPP11_COMPAT_DEPRECATED_WRITABLE_STRINGSC++11 Compatibility Deprecated Writable StringsYesHigh
CPP_WARN_DANGLINGDangling PointersYesHigh
CPP_WARN_DANGLING_FIELDDangling FieldYesHigh
CPP_WARN_DANGLING_GSLDangling Pointers Found by Guidelines Support LibraryYesHigh
CPP_WARN_DANGLING_INITIALIZER_LISTDangling Initializer ListYesHigh
CPP_WARN_DEFAULTED_FUNCTION_DELETEDDefaulted Function DeletedYesHigh
CPP_WARN_DELEGATING_CTOR_CYCLESDelegating Constructor CyclesYesHigh
CPP_WARN_DELETE_ABSTRACT_NON_VIRTUAL_DTORDelete Abstract Non-Virtual DestructorYesHigh
CPP_WARN_DELETE_INCOMPLETEDelete IncompleteYesHigh
CPP_WARN_DEPRECATED_BUILTINSDeprecated BuiltinsYesHigh
CPP_WARN_DEPRECATED_DECLARATIONSDeprecated DeclarationsYesHigh
CPP_WARN_DEPRECATED_INCREMENT_BOOLDeprecated Increment BoolYesHigh
CPP_WARN_DEPRECATED_NON_PROTOTYPEDeprecated Non-PrototypeYesHigh
CPP_WARN_DEPRECATED_REGISTERDeprecated RegisterYesHigh
CPP_WARN_DEPRECATED_VOLATILEDeprecated VolatileYesHigh
CPP_WARN_DIVISION_BY_ZERODivision by ZeroYesHigh
CPP_WARN_DYNAMIC_CLASS_MEMACCESSDynamic Class Memory AccessYesHigh
CPP_WARN_ENUM_COMPAREEnum CompareYesHigh
CPP_WARN_ENUM_COMPARE_SWITCHEnum Compare SwitchYesHigh
CPP_WARN_EXCEPTIONSExceptionsYesHigh
CPP_WARN_EXTERN_C_COMPATExtern C CompatibilityYesHigh
CPP_WARN_EXTERN_INITIALIZERExtern InitializerYesHigh
CPP_WARN_EXTRA_QUALIFICATIONExtra QualificationYesHigh
CPP_WARN_FIXED_POINT_OVERFLOWFixed Point OverflowYesHigh
CPP_WARN_FLAG_ENUMFlag EnumYesHigh
CPP_WARN_FORMATFormat StringYesHigh
CPP_WARN_FORMAT_EXTRA_ARGSFormat Extra ArgsYesHigh
CPP_WARN_FORMAT_INSUFFICIENT_ARGSFormat Insufficient ArgsYesHigh
CPP_WARN_FORMAT_INVALID_SPECIFIERFormat Invalid SpecifierYesHigh
CPP_WARN_FORMAT_SECURITYFormat SecurityYesHigh
CPP_WARN_FORMAT_ZERO_LENGTHFormat Zero LengthYesHigh
CPP_WARN_FORTIFY_SOURCEFortify SourceYesHigh
CPP_WARN_FREE_NONHEAP_OBJECTFree Non-Heap ObjectYesHigh
CPP_WARN_HEADER_GUARDHeader GuardYesHigh
CPP_WARN_IGNORED_ATTRIBUTESIgnored AttributesYesHigh
CPP_WARN_IGNORED_REFERENCE_QUALIFIERSIgnored Reference QualifiersYesHigh
CPP_WARN_IMPLICIT_CONST_INT_FLOAT_CONVERSIONImplicit Const Int Float ConversionYesHigh
CPP_WARN_IMPLICIT_CONVERSION_FLOATING_POINT_TO_BOOLImplicit Conversion Floating Point to BoolYesHigh
CPP_WARN_IMPLICIT_EXCEPTION_SPEC_MISMATCHImplicit Exception Spec MismatchYesHigh
CPP_WARN_IMPLICIT_FIXED_POINT_CONVERSIONImplicit Fixed Point ConversionYesHigh
CPP_WARN_IMPLICITLY_UNSIGNED_LITERALImplicitly Unsigned LiteralYesHigh
CPP_WARN_INACCESSIBLE_BASEInaccessible BaseYesHigh
CPP_WARN_INCOMPATIBLE_EXCEPTION_SPECIncompatible Exception SpecYesHigh
CPP_WARN_INCOMPATIBLE_LIBRARY_REDECLARATIONIncompatible Library RedeclarationYesHigh
CPP_WARN_INCOMPATIBLE_POINTER_TYPESIncompatible Pointer TypesYesHigh
CPP_WARN_INCOMPATIBLE_POINTER_TYPES_DISCARDS_QUALIFIERSIncompatible Pointer Types Discards QualifiersYesHigh
CPP_WARN_INCONSISTENT_MISSING_OVERRIDEInconsistent Missing OverrideYesHigh
CPP_WARN_INCREMENT_BOOLIncrement BoolYesHigh
CPP_WARN_INJECTED_CLASS_NAMEInjected Class NameYesHigh
CPP_WARN_INLINE_NAMESPACE_REOPENED_NONINLINEInline Namespace Reopened Non-InlineYesHigh
CPP_WARN_INSTANTIATION_AFTER_SPECIALIZATIONInstantiation After SpecializationYesHigh
CPP_WARN_INT_TO_POINTER_CASTInt to Pointer CastYesHigh
CPP_WARN_INT_TO_VOID_POINTER_CASTInt to Void Pointer CastYesHigh
CPP_WARN_INTEGER_OVERFLOWInteger OverflowYesHigh
CPP_WARN_INVALID_NO_BUILTIN_NAMESInvalid No Builtin NamesYesHigh
CPP_WARN_INVALID_NORETURNInvalid Noreturn AttributeYesHigh
CPP_WARN_INVALID_OFFSETOFInvalid OffsetofYesHigh
CPP_WARN_INVALID_PP_TOKENInvalid Preprocessor TokenYesHigh
CPP_WARN_LARGE_BY_VALUE_COPYLarge by Value CopyYesHigh
CPP_WARN_LITERAL_CONVERSIONLiteral ConversionYesHigh
CPP_WARN_LITERAL_RANGELiteral RangeYesHigh
CPP_WARN_LOGICAL_NOT_PARENTHESESLogical Not ParenthesesYesHigh
CPP_WARN_MACRO_REDEFINEDMacro RedefinedYesHigh
CPP_WARN_MAIN_RETURN_TYPEMain Return TypeYesHigh
CPP_WARN_MANY_BRACES_AROUND_SCALAR_INITMany Braces Around Scalar InitYesHigh
CPP_WARN_MAX_UNSIGNED_ZEROMax Unsigned ZeroYesHigh
CPP_WARN_MEMSET_TRANSPOSED_ARGSMemset Transposed ArgsYesHigh
CPP_WARN_MEMSIZE_COMPARISONMemsize ComparisonYesHigh
CPP_WARN_MISMATCHED_NEW_DELETEMismatched New DeleteYesHigh
CPP_WARN_MISSING_DECLARATIONSMissing DeclarationsYesHigh
CPP_WARN_MISSING_EXCEPTION_SPECMissing Exception SpecYesHigh
CPP_WARN_MULTICHARMultiple Characters in Character LiteralYesHigh
CPP_WARN_MULTIPLE_MOVE_VBASEMultiple Move Virtual BaseYesHigh
CPP_WARN_NEW_RETURNS_NULLNew Returns NullYesHigh
CPP_WARN_NODEREFNoderef AttirbuteYesHigh
CPP_WARN_NON_C_TYPEDEF_FOR_LINKAGENon-C Typedef for LinkageYesHigh
CPP_WARN_NON_LITERAL_NULL_CONVERSIONNon-Literal Null ConversionYesHigh
CPP_WARN_NON_POD_VARARGSNon-POD (Plain Old Data) Variadic ArgumentsYesHigh
CPP_WARN_NON_POWER_OF_TWO_ALIGNMENTNon-Power of Two AlignmentYesHigh
CPP_WARN_NONNULLNull as an ArgumentYesHigh
CPP_WARN_NONPORTABLE_INCLUDE_PATHNon-Portable Include PathYesHigh
CPP_WARN_NONTRIVIAL_MEMACCESSNontrivial Memory AccessYesHigh
CPP_WARN_NULL_ARITHMETICNull ArithmeticYesHigh
CPP_WARN_NULL_CHARACTERNull CharacterYesHigh
CPP_WARN_NULL_CONVERSIONNull ConversionYesHigh
CPP_WARN_NULL_DEREFERENCENull DereferenceYesHigh
CPP_WARN_ODROne Definition RuleYesHigh
CPP_WARN_ORDERED_COMPARE_FUNCTION_POINTERSOrdered Compare Function PointersYesHigh
CPP_WARN_OUT_OF_SCOPE_FUNCTIONOut of Scope FunctionYesHigh
CPP_WARN_OVERLOADED_SHIFT_OP_PARENTHESESOverloaded Shift Operator ParenthesesYesHigh
CPP_WARN_PARENTHESES_EQUALITYParentheses EqualityYesHigh
CPP_WARN_POINTER_ARITHPointer ArithmeticYesHigh
CPP_WARN_POINTER_BOOL_CONVERSIONPointer Bool ConversionYesHigh
CPP_WARN_POINTER_COMPAREPointer CompareYesHigh
CPP_WARN_POINTER_INTEGER_COMPAREPointer Integer CompareYesHigh
CPP_WARN_POINTER_SIGNPointer SignYesHigh
CPP_WARN_POINTER_TO_ENUM_CASTPointer to Enum CastYesHigh
CPP_WARN_POINTER_TO_INT_CASTPointer to Int CastYesHigh
CPP_WARN_POINTER_TYPE_MISMATCHPointer Type MismatchYesHigh
CPP_WARN_POTENTIALLY_EVALUATED_EXPRESSIONPotentially Evaluated ExpressionYesHigh
CPP_WARN_PRAGMA_ONCE_OUTSIDE_HEADERPragma once Outside HeaderYesHigh
CPP_WARN_QUALIFIED_VOID_RETURN_TYPEQualified Void Return TypeYesHigh
CPP_WARN_REDECLARED_CLASS_MEMBERRe-Declared Class MemberYesHigh
CPP_WARN_REDUNDANT_CONSTEVAL_IFRedundant Consteval IfYesHigh
CPP_WARN_REINTERPRET_BASE_CLASSReinterpret Base ClassYesHigh
CPP_WARN_REORDER_INIT_LISTReorder Initializer ListYesHigh
CPP_WARN_RETURN_STACK_ADDRESSReturn Stack AddressYesHigh
CPP_WARN_RETURN_TYPEReturn TypeYesHigh
CPP_WARN_RETURN_TYPE_C_LINKAGEReturn Type C LinkageYesHigh
CPP_WARN_SELF_ASSIGN_FIELDSelf Assign FieldYesHigh
CPP_WARN_SHIFT_COUNT_NEGATIVEShift Count NegativeYesHigh
CPP_WARN_SHIFT_COUNT_OVERFLOWShift Count OverflowYesHigh
CPP_WARN_SHIFT_NEGATIVE_VALUEShift Negative ValueYesHigh
CPP_WARN_SHIFT_OP_PARENTHESESShift Operator ParenthesesYesHigh
CPP_WARN_SHIFT_OVERFLOWShift OverflowYesHigh
CPP_WARN_SINGLE_BIT_BITFIELD_CONSTANT_CONVERSIONSingle Bit Bitfield Constant ConversionYesHigh
CPP_WARN_SIZEOF_ARRAY_ARGUMENTSizeof Array ArgumentYesHigh
CPP_WARN_SIZEOF_ARRAY_DECAYSizeof Array DecayYesHigh
CPP_WARN_SIZEOF_ARRAY_DIVSizeof Array DivisionYesHigh
CPP_WARN_SIZEOF_POINTER_DIVSizeof Pointer DivisionYesHigh
CPP_WARN_SIZEOF_POINTER_MEMACCESSSizeof Pointer Memory AccessYesHigh
CPP_WARN_STATIC_INLINE_EXPLICIT_INSTANTIATIONStatic Inline Explicit InstantiationYesHigh
CPP_WARN_STATIC_LOCAL_IN_INLINEStatic Local in InlineYesHigh
CPP_WARN_STATIC_SELF_INITStatic Self InitYesHigh
CPP_WARN_STRING_COMPAREString CompareYesHigh
CPP_WARN_STRING_PLUS_CHARString Plus CharYesHigh
CPP_WARN_STRING_PLUS_INTString Plus IntYesHigh
CPP_WARN_STRLCPY_STRLCAT_SIZEStrlcpy Strlcat SizeYesHigh
CPP_WARN_STRNCAT_SIZEStrncat SizeYesHigh
CPP_WARN_SWITCHSwitch StatementsYesHigh
CPP_WARN_SWITCH_BOOLSwitch BoolYesHigh
CPP_WARN_TAUTOLOGICAL_CONSTANT_COMPARETautological Constant CompareYesHigh
CPP_WARN_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARETautological Constant Out of Range CompareYesHigh
CPP_WARN_TAUTOLOGICAL_POINTER_COMPARETautological Pointer CompareYesHigh
CPP_WARN_TAUTOLOGICAL_UNDEFINED_COMPARETautological Undefined CompareYesHigh
CPP_WARN_TENTATIVE_DEFINITION_INCOMPLETE_TYPETentative Definition Incomplete TypeYesHigh
CPP_WARN_TRIGRAPHSTrigraphsYesHigh
CPP_WARN_TYPE_SAFETYType SafetyYesHigh
CPP_WARN_TYPEDEF_REDEFINITIONTypedef RedefinitionYesHigh
CPP_WARN_TYPENAME_MISSINGTypename MissingYesHigh
CPP_WARN_UNDEFINED_BOOL_CONVERSIONUndefined Bool ConversionYesHigh
CPP_WARN_UNDEFINED_INLINEUndefined InlineYesHigh
CPP_WARN_UNDEFINED_INTERNALUndefined InternalYesHigh
CPP_WARN_UNDEFINED_VAR_TEMPLATEUndefined Var TemplateYesHigh
CPP_WARN_UNEVALUATED_EXPRESSIONUnevaluated ExpressionYesHigh
CPP_WARN_UNGUARDED_AVAILABILITY_NEWUnguarded Availability NewYesHigh
CPP_WARN_UNICODEUnicode Escape SequencesYesHigh
CPP_WARN_UNICODE_HOMOGLYPHUnicode HomoglyphYesHigh
CPP_WARN_UNICODE_WHITESPACEUnicode WhitespaceYesHigh
CPP_WARN_UNICODE_ZERO_WIDTHUnicode Zero WidthYesHigh
CPP_WARN_UNKNOWN_DIRECTIVESUnknown DirectivesYesHigh
CPP_WARN_UNKNOWN_ESCAPE_SEQUENCEUnknown Escape SequenceYesHigh
CPP_WARN_UNQUALIFIED_STD_CAST_CALLUnqualified Standard Cast CallYesHigh
CPP_WARN_UNSEQUENCEDUnsequenced ModificationsYesHigh
CPP_WARN_UNSUPPORTED_AVAILABILITY_GUARDUnsupported Availability GuardYesHigh
CPP_WARN_UNSUPPORTED_FRIENDUnsupported FriendYesHigh
CPP_WARN_UNUSED_COMPARISONUnused ComparisonYesHigh
CPP_WARN_UNUSED_RESULTUnused ResultYesHigh
CPP_WARN_UNUSED_VALUEUnused ValueYesHigh
CPP_WARN_UNUSED_VOLATILE_LVALUEUnused Volatile LvalueYesHigh
CPP_WARN_USER_DEFINED_LITERALSUser Defined LiteralsYesHigh
CPP_WARN_VARARGSVariadic ArgumentsYesHigh
CPP_WARN_VEXING_PARSEVexing Parse OccurrencesYesHigh
CPP_WARN_VISIBILITYVisibility of DeclarationsYesHigh
CPP_WARN_VOID_POINTER_TO_ENUM_CASTVoid Pointer to Enum CastYesHigh
CPP_WARN_VOID_POINTER_TO_INT_CASTVoid Pointer to Int CastYesHigh
CPP_WARN_VOID_PTR_DEREFERENCEVoid Pointer DereferenceYesHigh
CPP_WARN_WRITABLE_STRINGSWritable StringsYesHigh
CPP_WARN_XOR_USED_AS_POWXor Used as PowerYesHigh
STI_FRIENDSUnnecessary FriendsYesRecommendedHigh
STI_SPECIAL_MEMBER_FUNCTIONSSpecial Member FunctionsYesRecommendedHigh
STI_UNUSEDUnused EntitiesYesRecommendedHigh