<commit_before>/* jshint node: true */
/*eslint-env node*/
'use strict';

var TemplateLinter = require('./broccoli-template-linter');

module.exports = {
  name: 'ember-cli-template-lint',

  lintTree: function(type, tree) {
    if (type === 'templates') {
      var ui = this.ui;
      var mockConsole = {
        log: function(data) {
          ui.writeLine(data);
        },

        error: function(data) {
          ui.writeLine(data, 'ERROR');
        }
      };

      return new TemplateLinter(tree, {
        annotation: 'TemplateLinter',
        templatercPath: this.project.root + '/.template-lintrc',
        generateTestFile: this.project.generateTestFile,
        _console: mockConsole
      });
    }
  }
};
<commit_msg>Add HTML Comment remover to normal template processing.<commit_after>/* jshint node: true */
/*eslint-env node*/
'use strict';

var TemplateLinter = require('./broccoli-template-linter');

module.exports = {
  name: 'ember-cli-template-lint',

  lintTree: function(type, tree) {
    if (type === 'templates') {
      var ui = this.ui;
      var mockConsole = {
        log: function(data) {
          ui.writeLine(data);
        },

        error: function(data) {
          ui.writeLine(data, 'ERROR');
        }
      };

      return new TemplateLinter(tree, {
        annotation: 'TemplateLinter',
        templatercPath: this.project.root + '/.template-lintrc',
        generateTestFile: this.project.generateTestFile,
        _console: mockConsole
      });
    }
  },

  setupPreprocessorRegistry: function(type, registry) {
    var RemoveConfigurationHtmlComments = require('./ext/plugins/internal/remove-configuration-html-comments');

    registry.add('htmlbars-ast-plugin', {
      name: 'remove-configuration-html-comments',
      plugin: RemoveConfigurationHtmlComments()
    });
  }
};

{'fraction_non_alphanumeric': 0.14005449591280653, 'fraction_numerical': 0.0, 'mean_word_length': 2.592954990215264, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5459723', 'n_tokens_mistral': 557, 'n_tokens_neox': 540, 'n_words': 106}