docs: function matchTerms(file, terms) {
    var contents = stripComments(file.contents.toString());
    var relative = file.relative;
    return Object.keys(terms).map(function(term) {
      var fix;
      var whitelist = terms[term].whitelist;
      var checkInTestFolder = terms[term].checkInTestFolder;
      // NOTE: we could do a glob test instead of exact check in the future
      // if needed but that might be too permissive.
      if (Array.isArray(whitelist) && (whitelist.indexOf(relative) != -1 ||
          isTestFile(file) && !checkInTestFolder)) {
        return false;
      }
      // we can't optimize building the `RegExp` objects early unless we build
      // another mapping of term -> regexp object to be able to get back to the
      // original term to get the possible fix value. This is ok as the
      // presubmit doesn't have to be blazing fast and this is most likely
      // negligible.
      var regex = new RegExp(term, 'gm');
      var index = 0;
      var line = 1;
      var column = 0;
      var match;
      var hasTerm = false;
  
      while ((match = regex.exec(contents))) {
        hasTerm = true;
        for (index; index < match.index; index++) {
          if (contents[index] === '\n') {
            line++;
            column = 1;
          } else {
            column++;
          }
        }
  
        util.log(util.colors.red('Found forbidden: "' + match[0] +
            '" in ' + relative + ':' + line + ':' + column));
        if (typeof terms[term] == 'string') {
          fix = terms[term];
        } else {
          fix = terms[term].message;
        }
  
        // log the possible fix information if provided for the term.
        if (fix) {
          util.log(util.colors.blue(fix));
        }
        util.log(util.colors.blue('=========='));
      }
  
      return hasTerm;
    }).some(function(hasAnyTerm) {
      return hasAnyTerm;
    });
  }