--- proj8.2p0.conf 2024-11-25 11:46:37.702643400 +1300 +++ proj8.3p0.conf 2024-11-25 11:47:25.120036700 +1300 @@ -1,7 +1,7 @@ # For emacs: -*- Shell-script -*- # ###################################################################### -# CodeSonar 8.2p0 Configuration File +# CodeSonar 8.3p0 Configuration File ###################################################################### # # CodeSonar will use preferences defined in this file when running @@ -791,6 +791,37 @@ ## INVOKE_COMPILER_FIRST = Yes +# Parameter LOG_COMPILER_ARGUMENT_FILES +# +# Purpose +# Specifies whether or not to log the contents of argument files +# processed by compiler models to the Native Compilation Details +# Log. +# +# Tags +# - BUILD_OUTPUT: Additional Outputs from the Build/Analysis +# +# Type +# { Yes, No } +# +# Notes +# The purpose of this parameter is to log the contents of argument +# files used by the native compiler (such as .rsp files) for +# debugging purposes. These files are often temporary and deleted +# as part of the build process. +# +# The responsibility for respecting this parameter falls to the +# compiler models. +# - If you have custom compiler models, ensure that the model +# checks the value of LOG_COMPILER_ARGUMENT_FILES and performs +# the appropriate logging when it is set to Yes. +# - The compiler models shipped with CodeSonar +# [doc/html/C_Module/CompilerModels/CompilerModels.html#preinstalled] +# all support this parameter. +# +## LOG_COMPILER_ARGUMENT_FILES = No + + # Parameter VIRTUAL_COMPILER_PROXY # # Purpose @@ -6358,6 +6389,7 @@ # WARNING_FILTER += allow class="Addition Overflow of Size" # WARNING_FILTER += allow class="Anonymous Namespace in Header File" # WARNING_FILTER += allow class="Array Parameter Mismatch" +# WARNING_FILTER += allow class="Array Parameter" # WARNING_FILTER += allow class="Array to Pointer Conversion on Temporary Object" # WARNING_FILTER += allow class="Array to Pointer Decay" # WARNING_FILTER += allow class="Assembly Pragma" @@ -6430,12 +6462,14 @@ # WARNING_FILTER += allow class="Implicit Address of Function" # WARNING_FILTER += allow class="Implicit Constructor Shadowing" # WARNING_FILTER += allow class="Implicit Function Declaration" +# WARNING_FILTER += allow class="Implicit Inheritance from Stateful Virtual Base" # WARNING_FILTER += allow class="Implicit Lambda Capture" # WARNING_FILTER += allow class="Implicit Pointer Type Conversion in Selection of C Generic" # WARNING_FILTER += allow class="Implicit Type" # WARNING_FILTER += allow class="Inappropriate Argument to Macro" # WARNING_FILTER += allow class="Inappropriate Argument to Integer Constant Macro" # WARNING_FILTER += allow class="Inappropriate Argument to memcmp" +# WARNING_FILTER += allow class="Inappropriate Assignment Operator Return" # WARNING_FILTER += allow class="Inappropriate Assignment Type" # WARNING_FILTER += allow class="Inappropriate Association Type in C Generic" # WARNING_FILTER += allow class="Inappropriate Bit-field Type" @@ -6444,6 +6478,7 @@ # WARNING_FILTER += allow class="Inappropriate Character Arithmetic" # WARNING_FILTER += allow class="Inappropriate Comparison of Virtual Member Function" # WARNING_FILTER += allow class="Inappropriate Declaration in Global Namespace" +# WARNING_FILTER += allow class="Inappropriate Include File Specification" # WARNING_FILTER += allow class="Inappropriate Operand Type" # WARNING_FILTER += allow class="Inappropriate Selection Type in C Generic" # WARNING_FILTER += allow class="Inappropriate Storage Duration" @@ -6470,6 +6505,7 @@ # WARNING_FILTER += allow class="Line Splicing in Comment" # WARNING_FILTER += allow class="Lock/Unlock Mismatch" # WARNING_FILTER += allow class="Locked Twice" +# WARNING_FILTER += allow class="Macro Argument is both Mixed and Expanded" # WARNING_FILTER += allow class="Macro Defined in Function Body" # WARNING_FILTER += allow class="Macro Defines Constant" # WARNING_FILTER += allow class="Macro Definition of Reserved Name" @@ -6511,6 +6547,7 @@ # WARNING_FILTER += allow class="Missing Non-default Association in C Generic" # WARNING_FILTER += allow class="Missing Parentheses" # WARNING_FILTER += allow class="Missing Test of Error Code" +# WARNING_FILTER += allow class="Missing User-defined Operations" # WARNING_FILTER += allow class="Missing break" # WARNING_FILTER += allow class="Missing default" # WARNING_FILTER += allow class="Missing for-loop Step" @@ -6525,6 +6562,10 @@ # WARNING_FILTER += allow class="Multiple Declarations of a Global" # WARNING_FILTER += allow class="Multiple External Declarations" # WARNING_FILTER += allow class="Multiple External Definitions" +# WARNING_FILTER += allow class="Multiple Inheritance with Private Interface Class" +# WARNING_FILTER += allow class="Multiple Inheritance with Protected Interface Class" +# WARNING_FILTER += allow class="Multiple Inheritance with Public Base Class" +# WARNING_FILTER += allow class="Multiple Inheritance with Too Many Protected Base Classes" # WARNING_FILTER += allow class="Multiple Return Statements" # WARNING_FILTER += allow class="Multiple Statements On Line" # WARNING_FILTER += allow class="Multiplication Overflow of Allocation Size" @@ -6602,6 +6643,11 @@ # WARNING_FILTER += allow class="Too Many Alignment Specifiers" # WARNING_FILTER += allow class="Too Many Dereferences" # WARNING_FILTER += allow class="Too Many Parameters" +# WARNING_FILTER += allow class="Too Many Side Effects in Assignment" +# WARNING_FILTER += allow class="Too Many Side Effects in Condition" +# WARNING_FILTER += allow class="Too Many Side Effects in Function Call" +# WARNING_FILTER += allow class="Too Many Side Effects in Statement" +# WARNING_FILTER += allow class="Too Many Side Effects in Switch" # WARNING_FILTER += allow class="Too Much Indirection in Declaration" # WARNING_FILTER += allow class="Trigraph" # WARNING_FILTER += allow class="Truncation of Allocation Size" @@ -6617,6 +6663,8 @@ # WARNING_FILTER += allow class="Unexercised Data Flow" # WARNING_FILTER += allow class="Union Type" # WARNING_FILTER += allow class="Unknown Lock" +# WARNING_FILTER += allow class="Unnamed Field" +# WARNING_FILTER += allow class="Unneeded Implicitly Generated Operations" # WARNING_FILTER += allow class="Unordered Initialization" # WARNING_FILTER += allow class="Unreachable Catch" # WARNING_FILTER += allow class="Unreachable Control Flow" @@ -6838,6 +6886,7 @@ # WARNING_FILTER += allow class="chroot without chdir" # WARNING_FILTER += allow class="delete with Non-Virtual Destructor" # WARNING_FILTER += allow class="sizeof Array Parameter" +# WARNING_FILTER += allow class="switch With Non-enum Expression" # # (Java warning classes) # WARNING_FILTER += allow class="Actual Parameter Element may be null (Java)" @@ -18759,6 +18808,16 @@ # - WC_LANG.STRUCT.SE.SIZEOF: Used by Side Effects in sizeof # - WC_LANG.STRUCT.SE.CGEN: Used by Side Effects in C Generic # Selection +# - WC_LANG.STRUCT.SE.ASSIGN: Used by Too Many Side Effects in +# Assignment +# - WC_LANG.STRUCT.SE.CALL: Used by Too Many Side Effects in +# Function Call +# - WC_LANG.STRUCT.SE.ECOND: Used by Too Many Side Effects in +# Condition +# - WC_LANG.STRUCT.SE.SWITCH: Used by Too Many Side Effects in +# Switch +# - WC_LANG.STRUCT.SE.STMT: Used by Too Many Side Effects in +# Statement # # Type # Boost 'POSIX Extended Regular Expression' @@ -18774,6 +18833,11 @@ # - Side Effects in Logical Operand # - Side Effects in sizeof # - Side Effects in C Generic Selection +# - Too Many Side Effects in Assignment +# - Too Many Side Effects in Function Call +# - Too Many Side Effects in Condition +# - Too Many Side Effects in Switch +# - Too Many Side Effects in Statement # # Notes # It is impossible to know precisely which functions have side @@ -19779,13 +19843,14 @@ # Type # { java1, java2, java3, java4, java5, java6, java7, java8, java9, # java10, java11, java12, java13, java14, java15, java16, java17, -# java18, java19, androidAPI1, androidAPI2, androidAPI3, -# androidAPI4, androidAPI5, androidAPI6, androidAPI7, androidAPI8, -# androidAPI9, androidAPI10, androidAPI11, androidAPI12, -# androidAPI13, androidAPI14, androidAPI15, androidAPI16, -# androidAPI17, androidAPI18, androidAPI19, androidAPI20, -# androidAPI21, androidAPI22, androidAPI23, androidAPI24, -# androidAPI25, androidAPI26, androidAPI27, androidAPI28 } +# java18, java19, java20, java21, java22, androidAPI1, androidAPI2, +# androidAPI3, androidAPI4, androidAPI5, androidAPI6, androidAPI7, +# androidAPI8, androidAPI9, androidAPI10, androidAPI11, +# androidAPI12, androidAPI13, androidAPI14, androidAPI15, +# androidAPI16, androidAPI17, androidAPI18, androidAPI19, +# androidAPI20, androidAPI21, androidAPI22, androidAPI23, +# androidAPI24, androidAPI25, androidAPI26, androidAPI27, +# androidAPI28 } # # Languages # Java @@ -22714,6 +22779,7 @@ # ## ALWAYS_EXPAND_FUNCTIONS += + # Parameter ERRNO_SETTING_FUNCTIONS # # Purpose @@ -22768,6 +22834,7 @@ #ERRNO_SETTING_FUNCTIONS += wcsrtombs #ERRNO_SETTING_FUNCTIONS += mbrtowc + # Parameter MAX_SOCKET_LISTEN_BACKLOG # # Purpose @@ -22791,3 +22858,165 @@ # See related configuration options ANALYSIS_SLAVES, DAEMON_SLAVES. # #MAX_SOCKET_LISTEN_BACKLOG = 65535 + + +# Parameter SWITCH_LABEL_DENSITY_THRESHOLD +# +# Purpose +# The threshold below which the cases in a switch statement are too +# sparse to trigger a switch With Non-enum Expression warning. +# +# Type +# integer +# +# Tags +# - WARNING_THRESHOLD: Warning-Class-Specific Settings +# - WC_LANG.STRUCT.SW.SWNEE: Used by switch With Non-enum +# Expression +# +# Behavior +# If case label density in a switch statement is below this +# threshold, a switch With Non-enum Expression warning will not be +# issued for that switch statement even if its controlling +# expression does not have enumeration type. +# +# Let L be the set of all case labels in the switch statement, +# excluding default, ranges, and character constants. +# +# Then case label density is: +# 100 * cardinality(L) / (max(L) - min(L) + 1) +# +# Notes +# See also SWITCH_LABEL_DENSITY_THRESHOLD. +# +# See the switch With Non-enum Expression documentation for +# information on enabling this warning class. + +#SWITCH_LABEL_DENSITY_THRESHOLD = 80 + + +# Parameter SWITCH_LABEL_CARDINALITY_THRESHOLD +# +# Purpose +# The threshold below which a switch statement has too few cases to +# trigger switch With Non-enum Expression warning. +# +# Type +# integer +# +# Tags +# - WARNING_THRESHOLD: Warning-Class-Specific Settings +# - WC_LANG.STRUCT.SW.SWNEE: Used by switch With Non-enum +# Expression +# +# Behavior +# If a switch statement has fewer than this many case labels, a +# switch With Non-enum Expression warning will not be issued for +# that switch statement even if its controlling expression does not +# have enumeration type. +# +# Notes +# Case labels of the following kinds are not included in the count +# for SWITCH_LABEL_CARDINALITY_THRESHOLD. +# - default +# - ranges +# - character constants +# +# See also SWITCH_LABEL_DENSITY_THRESHOLD. +# +# See the switch With Non-enum Expression documentation for +# information on enabling this warning class. + +#SWITCH_LABEL_CARDINALITY_THRESHOLD = 3 + + +# Parameter COMMENTED_OUT_CODE_SIZE_THRESHOLD +# +# Purpose +# Specifies a comment size threshold for reporting Commented-out +# Code warnings. +# +# Type +# positive integer +# +# Behavior +# If a comment contains fewer than this many characters (excluding +# characters deemed to be part of comment syntax), then that +# comment is not included in checks for the Commented-out Code +# warning class. +# +# More information on comment character counts +# [#comment_char_counts] is provided in the documentation for +# COMMENTED_OUT_CODE_MIN_RATIO / COMMENTED_OUT_CODE_MAX_RATIO . +# +# Tags +# - WC_LANG.COMM.CODE: Used by Commented-out Code +# - WARNING_THRESHOLD: Warning-Class-Specific Settings +# +# Notes +# Comments that are on contiguous lines are treated as a single +# comment. +# +# See also COMMENTED_OUT_CODE_MIN_RATIO, +# COMMENTED_OUT_CODE_MAX_RATIO. + +#COMMENTED_OUT_CODE_SIZE_THRESHOLD = 18 + + +# Parameter COMMENTED_OUT_CODE_MIN_RATIO +# Parameter COMMENTED_OUT_CODE_MAX_RATIO +# +# Purpose +# Specify upper and lower bounds on the "operator"/"non-operator" +# character ratio that will be treated as indicating the presence +# of code for Commented-out Code checks. +# +# Behavior +# A Commented-out Code warning will only be issued for a comment C +# if +# COMMENTED_OUT_CODE_MIN_RATIO < Cratio < COMMENTED_OUT_CODE_MAX_RATIO +# +# where: +# - OpC is the number of operator characters in C. +# - NopC is the number of non-operator characters in C. +# - Cratio = OpC / NopC +# +# Type +# real number greater than 0 +# +# Tags +# - WC_LANG.COMM.CODE: Used by Commented-out Code +# - WARNING_THRESHOLD: Warning-Class-Specific Settings +# +# Notes +# [ANCHOR comment_char_counts] Comment character counts are +# performed as follows. +# +# - Certain characters are deemed to be part of the comment syntax. +# These include /* , */ , and // , along with * characters at the +# beginning of a line. They are considered neither "operator +# characters" nor "non-operator characters". +# - "operator characters" are the non-alphanumeric characters that +# appear in C and C++ tokens, minus those that are likely to +# appear as punctuation characters in regular prose. Contiguous +# sequences of operator characters are treated as a single +# operator character. Characters deemed to be part of the comment +# syntax are not included in the count of operator characters. +# - "non-operator characters" are all non-whitespace characters +# that are neither "operator characters" nor part of the comment +# syntax. The count of non-operator characters starts with a +# value of 1. +# +# Comments that are on contiguous lines are treated as a single +# comment. +# +# Increasing COMMENTED_OUT_CODE_MAX_RATIO increases the risk of +# reporting false positives for comments that are ASCII art. +# +# Decreasing COMMENTED_OUT_CODE_MIN_RATIO increases the risk of +# false positives for small comments that contain mostly prose. +# +# See also COMMENTED_OUT_CODE_SIZE_THRESHOLD. + +#COMMENTED_OUT_CODE_MIN_RATIO = 0.19 +#COMMENTED_OUT_CODE_MAX_RATIO = 4.0