www.gusucode.com > polyspace_bf 案例源码 matlab代码程序 > polyspace_bf/CustomizeListOfBFDefectsToCheckExample.m
%% Customize List of Defects to Check % Use a polyspace.DefectsOptions object to customize the list of defects checked during a Polyspace Bug Finder analysis. %% % Create options objects. defects = polyspace.DefectsOptions; opts = polyspace.BugFinderOptions; %% % Set Bug Finder object properties to analyze with the customized defect list. opts.BugFinderAnalysis.CheckersList = defects; opts.BugFinderAnalysis.CheckersPreset = 'custom'; %% % Activate the numerical defects. defects.FLOAT_ZERO_DIV = true; defects.INT_ZERO_DIV = true; defects.FLOAT_ABSORPTION = true; defects.BITWISE_NEG = true; defects.FLOAT_CONV_OVFL = true; defects.FLOAT_OVFL = true; defects.INT_CONV_OVFL = true; defects.INT_OVFL = true; defects.FLOAT_STD_LIB = true; defects.INT_STD_LIB = true; defects.SHIFT_NEG = true; defects.SHIFT_OVFL = true; defects.SIGN_CHANGE = true; defects.UINT_CONV_OVFL = true; defects.UINT_OVFL = true; defects.BAD_PLAIN_CHAR_USE = true;