WIP new image analizis module in Phantomas

This commit is contained in:
Gaël Métais
2023-08-14 01:54:17 +02:00
parent 8e941233a0
commit c308850eb3
7 changed files with 117 additions and 61 deletions
+8 -1
View File
@@ -57,9 +57,16 @@ var RulesChecker = function() {
data.toolsResults[policy.tool].offenders[metricName]) {
offenders = data.toolsResults[policy.tool].offenders[metricName];
}
// It is possible to declare a transformation function for the main metric value.
// The function should
if (policy.valueTransformFn) {
rule.value = policy.valueTransformFn(offenders);
}
var offendersObj = {};
// It is possible to declare a transformation function for the offenders.
// The function should take an array of strings as single parameter and return a string.
if (policy.offendersTransformFn) {