Imagix 4D User Guide |
![]() | |||||
|---|---|---|---|---|---|---|
|
|
|||||
Among the attributes collected by Imagix 4D are the source checks. These file-level source checks can help with your quality assurance processes, by pointing out exceptions to generally agreed upon design and coding practices. Source check exceptions are listed in the Source Checks reports, and are indicated in the File Editor by underlining.
| Built-In Operators | Indicates that the number of built-in operators in an expression exceeds a user-specified threshold. | |
| Conversion Issue | Flags a conversion which could lose precision or rely on non-portable interpretations of arithmetic or pointers. This includes mixing of signed and unsigned operands when it can lead to portability problems. Also includes right-shifts of signed operands. (EX: int x; unsigned y; x = y;) | |
| Functions in Expression | Indicates that the number of function calls in an expression exceeds a user-specified threshold. | |
| Jump Statement | Flags a goto, break or continue statement which makes control flow more difficult to understand. | |
| K&R Style Declarator | Flags a function declarator that uses old style K&R syntax, which is not valid in C++. | |
| Missing Default Case | Flags a switch statement which does not have a default case. | |
| Missing/Mismatched Decl | Indicates an inconsistency between the declaration of a function and the parameters used in a function call. This is mostly effective for C, where prototypes are missing or inconsistent. | |
| Missing Return Type | Flags a function declaration which does not specify the return type. | |
| Needs Compound Statement | Flags a potentially missing compound statement (braces). This includes possible errors caused by a dangling else or by a statement mistakenly disassociated from a while or for. | |
| No Constructor | Indicates that a class does not have a constructor. Best practices recommend that explicit constructors always be defined in order to avoid problems in initializing the class objects. | |
| Omitted Lines | Flags a source line which is ignored by the analyzer due to the current preprocessor settings. | |
| Old Style Allocator | Flags the use of old style memory allocators, such as malloc, realloc, calloc or free, in a C++ program. | |
| Potential Static Function | Indicates that a function is only called from within the file where it is defined, but is not declared static. | |
| Problematic Constructor | Flags a problematic definition in a class constructor. This includes virtual function calls from the constructor and initialization order problems. | |
| Return Ignored | Flags a statement which ignores the result of either a function call or any other expression where the computation is not stored. This typically indicates that error results are being ignored. | |
| Skipped Lines | Flags a source line which is skipped due to syntax problems that the analyzer cannot resolve. If the source compiles in the original development environment, this could be an indication of missing include files or incorrect configuration of the analyzer. | |
| Suspicious Assignment | Flags a suspicious assignment in a conditional expression or argument list, where the assignment might actually be intended as a comparison. | |
| Unclear Subexpression | Flags a subexpression which is potentially not written as intended. This includes comparisons that can be statically evaluated like unsigned variables and negative numbers. Catches typical suspicious relational operator uses and potential lack of parenthesis. (EX: x && y | z). | |
| Unused Global Variable | Indicates that a global variable is never used in the source files loaded into the project. | |
| Unused Local Variable | Indicates that a local variable is never used. | |
| Unused Static Variable | Indicates that a static variable is never used. | |
| Unterminated Case | Flags a case in a switch statement which is not terminated by an explicit transfer of control, such as a break statement. | |
| Variable Number of Args | Flags a function which has a variable number of arguments. |