Rules Help

EZ-Metrix uses rules for each programming languages to help differentiate source code from comments and blanks: A rule consists of a name, comment delimiters and a difference threshold.
The Name is used to identify the rule, and typically is named the same as the programming language that it supports.
Comment delimiters are used to define comments in each supported programming language.
Since each language has its own comment delimiters, you need a rule for each language you wish to measure. You may specify a single line comment delimiter and/or two multi-line comment delimiters (start and end). Each delimiter can be up to 80 characters long. Comment delimiters are used for both comparison and non-comparison measures.

The difference threshold is a number that is used to determine if a line is changed or new/deleted, and is used only for comparison measures. If the number of characters within a line that have been changed is greater than this threshold number, the modified line is counted as new & deleted. Otherwise, the line is counted as changed.

Note: Starting with version 4.1.0.3, the difference threshold is expressed as a percentage, to provide more meaningful results.

How to Create a Rule

  1. Select the "Create a New Rule" link.
  2. Enter the rule name.
  3. Enter the single line comment character.
  4. Enter the multi-line beginning comment character(s).
  5. Enter the multi-line ending comment character(s).
  6. Enter the difference threshold percent.
  7. Select the "Create New Rule" button. A confirmation message is displayed.
  8. The new rule is created and ready for your use.
How to Update a Rule

  1. Select the "Modify an Existing Rule" link.
  2. Select the rule to update from the dropdown list.
  3. Select the "Get Rule" button.
  4. You are not permitted to change the rule ID.
  5. Change the single line comment character, if you wish.
  6. Change the multi-line beginning comment character(s), if you wish.
  7. Change the multi-line ending comment character(s), if you wish.
  8. Change the difference threshold percent, as needed.
  9. Select the "Update Rule" button. A confirmation message is displayed.
  10. The new rule is created and ready for your use.
How to Delete a Rule (Admin only)

  1. Select the "Delete an Existing Rule" link. If you cannot see this link, you are not an Admin - ask your system admin to perform this function for you.
  2. Select the rule to update from the drop-down list.
  3. Select the "Delete" button. A warning message is displayed.
  4. Read the warning message, and if you still want to delete the rule, select the "Delete" button.
  5. The new rule is created and ready for your use.