how to customize METRICS-39 ?
I am trying to create a version of METRICS-39 with a different threshold. I have duplicated the rule and modified the RULEMAP. However when I open the rule in the wizard there doesn't appear to be a way to modify the threshold like other rules.
what am I missing?
Comments
-
METRICS-39 is a cross rule. It means that it contains additional METRICS-39_TXT.rule in 'ext' subdirectory. You can change a threshold in python method 'result' in METRICS-39_TXT.rule.
0 -
Is there a special tool for opening this file? The file isn't editable with a text editor.
0 -
Yes, rules can be modified using 'RuleWizard'. See "Customizing and Creating Rules with RuleWizard" in C++test documentation.
0 -
I can not modify this metric. I have modified others. This is what I see when opening the duplication METRICS-39 in the RuleWizard
0 -
You should modify the METRICS-39_TXT.rule rule. Open it directly in the Rule Wizard (File-> Open) from the "dir/ext" directory, where "dir" is the directory where the duplicated METRICS-39 rule is saved (by default it is workspace.metadata.plugins\com.parasoft.xtest.staticanalyzer.eclipse.core.cpp\urules\ext ).
It looks like:
At the end of this rule is the "result" Python method. You can modify the threshold in the "if (VOCF> 4.0)" condition.0