--- codesonar-3.5p1/codesonar/template.conf 2010-01-05 13:14:48.000000000 -0500 +++ codesonar-3.5p2/codesonar/template.conf 2010-05-14 01:51:36.000000000 -0400 @@ -54,10 +54,9 @@ # Parameter CFLAGS_PREPEND # # Purpose -# Modify the CFLAGs being passed to the parser. Typical CFLAGs -# include -D, -U, and -I directives. +# Modify the CFLAGs being passed to the parser. # # Type # a list of CFLAGS # @@ -84,10 +83,9 @@ # Parameter CFLAGS_APPEND # # Purpose -# Modify the CFLAGs being passed to the parser. Typical CFLAGs -# include -D, -U, and -I directives. +# Modify the CFLAGs being passed to the parser. # # Type # a list of CFLAGS # @@ -140,17 +138,23 @@ # COMPILER_MODELS += clsh.exe -> cl # COMPILER_MODELS += clthumb.exe -> cl # COMPILER_MODELS += gcc.exe -> gcc # COMPILER_MODELS += g++.exe -> gpp +# COMPILER_MODELS += gcc-3.exe -> gcc +# COMPILER_MODELS += g++-3.exe -> gpp +# COMPILER_MODELS += gcc-4.exe -> gcc +# COMPILER_MODELS += g++-4.exe -> gpp # COMPILER_MODELS += gpp.exe -> gpp # COMPILER_MODELS += gxx.exe -> gpp # COMPILER_MODELS += ecomppc.exe -> ecomppc # COMPILER_MODELS += ecomx86.exe -> ecomppc # COMPILER_MODELS += ecomarm.exe -> ecomppc # COMPILER_MODELS += ecom86.exe -> ecomppc # COMPILER_MODELS += ecom68.exe -> ecomppc # COMPILER_MODELS += armcc.exe -> armcc +# COMPILER_MODELS += armcpp.exe -> armcpp # COMPILER_MODELS += tcc.exe -> armcc +# COMPILER_MODELS += tcpp.exe -> armcpp # COMPILER_MODELS += iccarm.exe -> iccarm # COMPILER_MODELS += icc430.exe -> icc430 # COMPILER_MODELS += iccm32c.exe -> iccm32c # COMPILER_MODELS += mcpcom.exe -> mcpcom @@ -182,9 +186,11 @@ # COMPILER_MODELS += shc -> shc # COMPILER_MODELS += shcpp -> shcpp # COMPILER_MODELS += ch38 -> ch38 # COMPILER_MODELS += armcc -> armcc +# COMPILER_MODELS += armcpp -> armcpp # COMPILER_MODELS += tcc -> armcc +# COMPILER_MODELS += tcpp -> armcpp # \endcode # # To activate the Hi-Tech compiler model for Linux, Solaris, and OS X: # \code @@ -372,9 +379,10 @@ # This parameter is ignored on non-Windows systems. Its only known # use is to make sure the parser has access to output files produced # by the compiler when using Microsoft's \tt #import directive. # -# INVOKE_COMPILER_FIRST = No + +# INVOKE_COMPILER_FIRST = Yes # Parameter CODEWARRIOR_INSTALLS # @@ -665,10 +673,8 @@ # Front-End Options \endlink for descriptions of the available # options. # # Notes -# An example use case is adding a preinclude file. -# # The += operator will actually prepend to this preference (in all # other cases except \param CFLAGS_PREPEND , the += operator # appends). This means that if you have two \tt # EDG_FRONTEND_OPTIONS_PREPEND += statements in this file, the @@ -693,9 +699,19 @@ # Front-End Options \endlink for descriptions of the available # options. # # Notes -# An example use case is adding a preinclude file. +# To add mydir to the list of directories searched for +# include files: +# \code +# EDG_FRONTEND_OPTIONS_APPEND += -Imydir +# \endcode +# +# To set macro MYMACRO to the empty string (useful if you +# are getting a parser error complaining that MYMACRO is undefined): +# \code +# EDG_FRONTEND_OPTIONS_APPEND += -DMYMACRO= +# \endcode # EDG_FRONTEND_OPTIONS_APPEND += @@ -1067,8 +1083,24 @@ # override the setting of this parameter. # +# Parameter BADFS_NOSLEEP +# +# Purpose +# Specifies whether or not to give users a chance to stop +# the build when we detect that the file system the project +# is being putting on could cause performance problems. +# +# Type +# {Yes, No} +# +# Notes +# If environment variable \tt GT_BADFS_NOSLEEP is set, its value will +# override the setting of this parameter. +BADFS_NOSLEEP = No + + # Parameter FATSTATS_DUMP_FILE # # Purpose # Specifies an output file for certain diagnostic information. @@ -1099,8 +1131,48 @@ # "No", the entire project will be rebuilt and re-analyzed. # INCREMENTAL_BUILD = Yes + +# Parameter DRY_RUN +# +# Purpose +# Dry runs are useful for counting lines and locating parse errors +# without running the CodeSonar analysis, and therefore without +# consuming licensed lines. +# +# Type +# {Yes, No} +# +# Behavior +# When set to "Yes", CodeSonar will perform a "dry run": it will +# count lines and report parse errors, but not perform the CodeSonar +# analysis. Because the analysis is not performed, no warnings are issued. +# +# When set to "No", CodeSonar will perform the full build/analysis +# based on the specified build command. +# +# Notes +# It can be useful to perform a dry run on a project before +# analyzing it to see whether it will exhaust your license (without +# actually exhausting your license). +# +# Dry run results are presented in an Analysis page in the Web +# GUI. See \link ../GUI/GUI_Analysis.html#dry_runs Analysis: Dry +# Runs\endlink in the GUI reference for more information. +# +# CodeSonar does not require a license to perform a dry run. +# +# Mixing dry runs and analysis runs for the same .prj_files +# directory (that is, the same project name) is not supported. +# +# Do not use \tt DRY_RUN if the hub is running version 3.5p1 or earlier: +# older hubs do not understand this parameter and will consume +# licensed lines regardless of its setting. + +# DRY_RUN = No + + # Parameter HUB_ADDRESS # # Purpose # Specifies the hub address CodeSonar should use. @@ -1407,13 +1483,13 @@ # BAD_FUNCTION_MESSAGE should also have the same \tt # BAD_FUNCTION_CATEGORIES and \tt BAD_FUNCTION_RANK values (that is, # they should only differ in the \tt BAD_FUNCTION_REGEX setting). # -# Similarly, if a set of \tt BAD_FUNCTION_* rules has a \tt # -# BAD_FUNCTION_MESSAGE that is the same as the name of a standard # -# CodeSonar warning class, the category and rank settings of the # +# Similarly, if a set of \tt BAD_FUNCTION_* rules has a \tt +# BAD_FUNCTION_MESSAGE that is the same as the name of a standard +# CodeSonar warning class, the category and rank settings of the # standard class will apply and any \tt BAD_FUNCTION_CATEGORIES or -# \tt # BAD_FUNCTION_RANK specified in the set will not be used. +# \tt BAD_FUNCTION_RANK specified in the set will not be used. # # Examples: # \code # BAD_FUNCTION_REGEX = ^gets$ @@ -1495,9 +1571,9 @@ BAD_FUNCTION_CATEGORIES = BADFUNC.TEMP.TMPNAM;BSI:TMPNAM-TMPFILE;BSI:Truncate;CWE:377 BAD_FUNCTION_RANK = 43.0 BAD_FUNCTION_REGEX = ^GetTempFileName(A|W)?$ -BAD_FUNCTION_REGEX = Use of GetTempFileName +BAD_FUNCTION_MESSAGE= Use of GetTempFileName BAD_FUNCTION_CATEGORIES = BADFUNC.TEMP.GETTEMPFILENAME;BSI:GetTempFileName;CWE:377 BAD_FUNCTION_RANK = 43.0 BAD_FUNCTION_REGEX = ^setjmp$ @@ -2184,8 +2260,26 @@ # MAX_SIMILAR_PATHS = 1 +# Parameter MAX_ATTEMPTED_SIMILAR_PATHS +# +# Purpose +# Bounds the number of potentially similar warnings that CodeSonar +# will attempt to refine. Both successfully refined warnings and +# dismissed warnings count against this limit. +# +# Type +# integer +# +# Notes +# MAX_SIMILAR_PATHS is similar to this except that it bounds the +# number of reported warnings. MAX_ATTEMPTED_SIMILAR_PATHS should +# always be at least as large as MAX_SIMILAR_PATHS. +# +MAX_ATTEMPTED_SIMILAR_PATHS = 4 + + # Parameter MAX_CHECKED_INPUTS_PER_PROCEDURE # # Purpose # Specifies how many inputs to a procedure can be checked at call sites. @@ -2428,9 +2522,8 @@ RETURN_CHECKER_CHECKED_FUNCS += ^ferror$ RETURN_CHECKER_CHECKED_FUNCS += ^fgetc$ RETURN_CHECKER_CHECKED_FUNCS += ^fputc$ RETURN_CHECKER_CHECKED_FUNCS += ^fread$ -RETURN_CHECKER_CHECKED_FUNCS += ^fscanf$ RETURN_CHECKER_CHECKED_FUNCS += ^fseek$ RETURN_CHECKER_CHECKED_FUNCS += ^fsetpos$ RETURN_CHECKER_CHECKED_FUNCS += ^fstat$ RETURN_CHECKER_CHECKED_FUNCS += ^fstatfs$ @@ -2455,9 +2548,8 @@ RETURN_CHECKER_CHECKED_FUNCS += ^readv$ RETURN_CHECKER_CHECKED_FUNCS += ^recv$ RETURN_CHECKER_CHECKED_FUNCS += ^recvfrom$ RETURN_CHECKER_CHECKED_FUNCS += ^rename$ -RETURN_CHECKER_CHECKED_FUNCS += ^scanf$ RETURN_CHECKER_CHECKED_FUNCS += ^select$ RETURN_CHECKER_CHECKED_FUNCS += ^send$ RETURN_CHECKER_CHECKED_FUNCS += ^sendmsg$ RETURN_CHECKER_CHECKED_FUNCS += ^sendto$ @@ -2537,8 +2629,16 @@ RETURN_CHECKER_CHECKED_FUNCS += ^LocalUnlock$ RETURN_CHECKER_CHECKED_FUNCS += ^ReleaseMutex$ RETURN_CHECKER_CHECKED_FUNCS += ^ResetEvent$ RETURN_CHECKER_CHECKED_FUNCS += ^SetEvent$ +RETURN_CHECKER_CHECKED_FUNCS += ^(__isoc99_)?_cscanf$ +RETURN_CHECKER_CHECKED_FUNCS += ^(__isoc99_)?_[fs]tscanf$ +RETURN_CHECKER_CHECKED_FUNCS += ^(__isoc99_)?_tscanf$ +RETURN_CHECKER_CHECKED_FUNCS += ^(__isoc99_)?f[tw]?scanf$ +RETURN_CHECKER_CHECKED_FUNCS += ^(__isoc99_)?sw?scanf$ +RETURN_CHECKER_CHECKED_FUNCS += ^(__isoc99_)?v?[fs]scanf$ +RETURN_CHECKER_CHECKED_FUNCS += ^(__isoc99_)?vftscanf$ +RETURN_CHECKER_CHECKED_FUNCS += ^(__isoc99_)?[vw]?scanf$ # Parameter RETURN_CHECKER_IGNORED_FUNCS # @@ -2660,16 +2760,16 @@ FORMAT_STRING_CHECKER_CHECKED_FUNCS += 3, ^wnsprintf[AW]?$ FORMAT_STRING_CHECKER_CHECKED_FUNCS += 2, ^wsprintf[AW]?$ FORMAT_STRING_CHECKER_CHECKED_FUNCS += 2, ^wvsprintf$ FORMAT_STRING_CHECKER_CHECKED_FUNCS += 3, ^wvnsprintf[AW]?$ -FORMAT_STRING_CHECKER_CHECKED_FUNCS += 1, ^_cscanf$ -FORMAT_STRING_CHECKER_CHECKED_FUNCS += 2, ^_[fs]tscanf$ -FORMAT_STRING_CHECKER_CHECKED_FUNCS += 1, ^_tscanf$ -FORMAT_STRING_CHECKER_CHECKED_FUNCS += 2, ^f[tw]?scanf$ -FORMAT_STRING_CHECKER_CHECKED_FUNCS += 2, ^sw?scanf$ -FORMAT_STRING_CHECKER_CHECKED_FUNCS += 2, ^v?[fs]scanf$ -FORMAT_STRING_CHECKER_CHECKED_FUNCS += 2, ^vftscanf$ -FORMAT_STRING_CHECKER_CHECKED_FUNCS += 1, ^[vw]?scanf$ +FORMAT_STRING_CHECKER_CHECKED_FUNCS += 1, ^(__isoc99_)?_cscanf$ +FORMAT_STRING_CHECKER_CHECKED_FUNCS += 2, ^(__isoc99_)?_[fs]tscanf$ +FORMAT_STRING_CHECKER_CHECKED_FUNCS += 1, ^(__isoc99_)?_tscanf$ +FORMAT_STRING_CHECKER_CHECKED_FUNCS += 2, ^(__isoc99_)?f[tw]?scanf$ +FORMAT_STRING_CHECKER_CHECKED_FUNCS += 2, ^(__isoc99_)?sw?scanf$ +FORMAT_STRING_CHECKER_CHECKED_FUNCS += 2, ^(__isoc99_)?v?[fs]scanf$ +FORMAT_STRING_CHECKER_CHECKED_FUNCS += 2, ^(__isoc99_)?vftscanf$ +FORMAT_STRING_CHECKER_CHECKED_FUNCS += 1, ^(__isoc99_)?[vw]?scanf$ FORMAT_STRING_CHECKER_CHECKED_FUNCS += 3, ^StringCchPrintf$ FORMAT_STRING_CHECKER_CHECKED_FUNCS += 2, ^v?syslog$ FORMAT_STRING_CHECKER_CHECKED_FUNCS += 1, ^CH?String::FormatV?$ FORMAT_STRING_CHECKER_CHECKED_FUNCS += 1, ^CHString::FormatMessageW$ @@ -3404,11 +3504,11 @@ # Every file listed should be a C or C++ source file that has # previously been compiled in the file's directory with # \code # (Windows) -# codesonar -w xcc "-I/codesonar/smel" -c +# codesonar -w xcc "-I/codesonar/libmodels" -c # # (Otherwise) -# codesonar -w xcc -I/codesonar/smel -c +# codesonar -w xcc -I/codesonar/libmodels -c # \endcode