Boolean Parameters

A boolean flag parameter is a reliable indicator for a violation of the Single Responsibility Principle. You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Options

Name Description Values Default
Active Set this to false if you want to disable the check. true or false true
Priority Set the priority value for this check in the output file. A value between 0 and 6 3
IgnoreConstructors If set to true the checker ignore the parameters of all constructors. true or false true
IgnoreSetterMethods If set to true the checker ignore the parameters all methods with names starting with set . true or false true

Warnings

Const Name Conventions

Names of constants should always be defined in uppercase. Multiple words should be separated by an underscore.

Options

Name Description Values Default
Active Set this to false if you want to disable the check. true or false true
Priority Set the priority value for this check in the output file. A value between 0 and 6 3

Warnings

Cyclomatic Complexity

Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are if , while , for , and case labels . Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11 and more is very high complexity.

Options

Name Description Values Default
Active Set this to false if you want to disable the check. true or false true
Priority Set the priority value for this check in the output file. A value between 0 and 6 3
MaxCyclomaticComplexity Set the maximum cyclomatic complexity a method can have, before a warning is raised. any positive integer 10

Warnings

Exception Handling

An empty exception handling hides errors. Exceptions should at least be logged and the user notified.

Options

Name Description Values Default
Active Set this to false if you want to disable the check. true or false true
Priority Set the priority value for this check in the output file. A value between 0 and 6 3

Warnings

Exit Expression

An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

Options

Name Description Values Default
Active Set this to false if you want to disable the check. true or false true
Priority Set the priority value for this check in the output file. A value between 0 and 6 3

Warnings

Global Variable Count

The use of global variables indicates problems with data transfer. Reduce global variables as much as possible.

Options

Name Description Values Default
Active Set this to false if you want to disable the check. true or false true
Priority Set the priority value for this check in the output file. A value between 0 and 6 3
MaxCount The maximum of global variables in an unit / program. any positive integer 1
CheckOnlyInterfacePart If set to true the checker ignore a variables in the implementation part of an unit. true or false true

Warnings

Goto

Goto makes code harder to read and it is nearly impossible to understand the control flow of an application that uses this language construct. Consider to replace Goto with regular control structures and separate methods.

Options

Name Description Values Default
Active Set this to false if you want to disable the check. true or false true
Priority Set the priority value for this check in the output file. A value between 0 and 6 3

Warnings

Magic Values

Magic values hidden in the source code make it difficult to grasp the meaning of the code. Replace them with constants that are easier to find at their definition point.

Options

Name Description Values Default
Active Set this to false if you want to disable the check. true or false true
Priority Set the priority value for this check in the output file. A value between 0 and 6 3
CheckNumbers If set to true the source code is checked for numerical magic values. true or false true
CheckStrings If set to true the source code is checked for string magic values. true or false true
IgnoreZeroAndOne If set to true the checker ignores the numerical values 0 and 1. true or false true

Warnings

Method Length

Long methods usually indicate that the method is doing too much. Reduce the method size by creating helper methods. And remove any copy/pasted code.

Options

Name Description Values Default
Active Set this to false if you want to disable the check. true or false true
Priority Set the priority value for this check in the output file. A value between 0 and 6 3
MaxLines The maximum of lines a method can have. If a method is longer, it will raise a warning. any positive integer 25

Warnings

Output Parameters

Options

Name Description Values Default
Active Set this to false if you want to disable the check. true or false true
Priority Set the priority value for this check in the output file. A value between 0 and 6 3

Warnings

Parameter Count

Long parameter lists can indicate that an object or a record should be created to wrap the numerous parameters. Basically, try to group the parameters together.

Options

Name Description Values Default
Active Set this to false if you want to disable the check. true or false true
Priority Set the priority value for this check in the output file. A value between 0 and 6 3
MaxParameters The maximum count of parameters for any procedure or function. any positive integer 3
IgnoreConstructors If set to true the checker ignore the parameters of all constructors. true or false true

Warnings

Public Count

A large number of public methods and attributes in a class can indicate the class may need to be broken up as effort is raising to thoroughly test it.

Options

Name Description Values Default
Active Set this to false if you want to disable the check. true or false true
Priority Set the priority value for this check in the output file. A value between 0 and 6 3
MaxPublicCount The maximum count of public fields, methods and properties of a class. any positive integer 50

Warnings

Variable Name Size

Detects when a field, local, or a parameter has a very short name. Avoid this and use meaningful names for your variables.

Options

Name Description Values Default
Active Set this to false if you want to disable the check. true or false true
Priority Set the priority value for this check in the output file. A value between 0 and 6 3
AllowMinfiedTypeNames If set to true , some short names could be used without causing a warning.
  • c for Char variables
  • i and j for ShortInt, Word, Integer, LongInt and Int64 variables
  • s for String variables
  • e for Exception variables
  • o for all variable types
true or false true
AllowXYZForNumbers If set to true , you can use x , y and z for numerical variables. true or false false
MinCharacters The minimum auf characters for variables. If lower a warning is raised. any positive integer 3
NameExceptions Use this option to define a list of variable names, which are not checked for their length. a comma-separated list of strings

Warnings

With Do

Options

Name Description Values Default
Active Set this to false if you want to disable the check. true or false true
Priority Set the priority value for this check in the output file. A value between 0 and 6 3

Warnings