build-system/tasks/dep-check.js
/**
 * Run Module dependency graph against the rules.
 *
 * @param {!Array<!ModuleDef>} modules
 */
Run Module dependency graph against the rules.
@param {!Array} modules
Run Module dependency graph against the rules . @param { !Array } modules
function runRules(modules) {
  var errorsFound = false;
  Object.keys(modules).forEach(moduleName => {
    var deps = modules[moduleName];
    var errors = flatten(rules.map(rule => rule.run(moduleName, deps)));
    if (errors.length) {
      errorsFound = true;
      errors.forEach(red);
    }
  });
  return errorsFound;
}
function runRules ( modules ) { var errorsFound = false ; Object . keys ( modules ) . forEach ( moduleName => { var deps = modules [ moduleName ] ; var errors = flatten ( rules . map ( rule => rule . run ( moduleName , deps ) ) ) ; if ( errors . length ) { errorsFound = true ; errors . forEach ( red ) ; } } ) ; return errorsFound ; }
Run Module dependency graph against the rules.
Run Module dependency graph against the rules .
// Run Rules against the modules and flatten for reporting. // Report errors.