How to Automatically Enforce Your Custom Coding Standards
To have Jtest enforce a custom coding standard that you created, saved and enabled:
- Verify that Jtest is configured to enforce the custom coding standards you want it to enforce. Both the rule and its severity level must be enabled.
- To do this, open the Global Test Parameters window, then go to Static Analysis> Rules> Severity Levels and Static Analysis Rules> User Defined Rules. Enable all severity level(s) corresponding to the rule(s) you want to enforce. (Each rule's severity level is appended to its label in the User Defined Rules branch). Also, verify that the option that corresponds to the appropriate rule is enabled.
- Run Jtest as normal.
Enabling and Disabling Rules
If a custom rule is not relevant to a particular situation, you might want to suppress the reporting of this rule's violations. Rules created in RuleWizard can be suppressed in the same way that built-in Jtest rules are suppressed. For information about suppressions, refer to the Jtest User's Guide.
When you suppress a rule, Jtest checks for violations, but does not report them. If you do not want violations of a particular rule reported under most circumstances, you may improve testing performance by disabling the rule, then enabling the rule only when you want to enforce it.
If you never enabled a rule, the rule is already disabled.
To disable or enable a rule:
- Open the Global Test Parameters window by clicking the Global button.
- Go to Static Analysis> Rules> Static Analysis Rules> User Defined Rules.
- To disable a rule, check the box associated with the rule you want to disable (rules are grouped by Rule ID and listed by Rule Header).
- To enable a rule, check the box associated with the rule you want to enable.
|