Adding totalWeight metric

This commit is contained in:
Gaël Métais
2015-05-29 16:13:32 +02:00
parent 040dba961a
commit c6c967f89c
7 changed files with 496 additions and 5 deletions
+4 -1
View File
@@ -3,6 +3,7 @@ var debug = require('debug')('ylt:runner');
var phantomasWrapper = require('./tools/phantomas/phantomasWrapper');
var jsExecutionTransformer = require('./tools/jsExecutionTransformer');
var weightChecker = require('./tools/weightChecker');
var rulesChecker = require('./rulesChecker');
var scoreCalculator = require('./scoreCalculator');
@@ -25,8 +26,10 @@ var Runner = function(params) {
// Treat the JS Execution Tree from offenders
data = jsExecutionTransformer.transform(data);
// Other tools go here
// Redownload every file
return weightChecker.recheckAllFiles(data);
}).then(function(data) {
// Rules checker
var policies = require('./metadata/policies');