<commit_before>const nodeW3CValidator = require('node-w3c-validator');
const del = require('del');

module.exports = () => {
  const settings = require(`${process.cwd()}/marmelad/settings.marmelad`);
  const options = Object.assign({
    format: 'html',
    skipNonHtml: true,
    exec: {
      maxBuffer: 1024 * 1024,
    },
    reportName: 'w3c-validator.html',
  }, settings.w3cValidator);

  del.sync(`${settings.paths.dist}/${options.reportName}`);

  nodeW3CValidator(`${settings.paths.dist}/**/*.html`, options, (err, output) => {
    if (err === null) {
      return;
    }
    nodeW3CValidator.writeFile(`${settings.paths.dist}/${options.reportName}`, output);
  });
};<commit_msg>Изменил название переменной для хранения опция w3c валидатора<commit_after>const nodeW3CValidator = require('node-w3c-validator');
const del = require('del');

module.exports = () => {
  const settings = require(`${process.cwd()}/marmelad/settings.marmelad`);

  const nw3cOpts = Object.assign({
    format: 'html',
    skipNonHtml: true,
    exec: {
      maxBuffer: 1024 * 1024,
    },
    reportName: 'w3c-validator.html',
  }, settings.w3cValidator);

  del.sync(`${settings.paths.dist}/${nw3cOpts.reportName}`);

  nodeW3CValidator(`${settings.paths.dist}/**/*.html`, nw3cOpts, (err, output) => {
    if (err === null) {
      return;
    }
    nodeW3CValidator.writeFile(`${settings.paths.dist}/${nw3cOpts.reportName}`, output);
  });
};
{'fraction_non_alphanumeric': 0.1884159106769016, 'fraction_numerical': 0.023028611304954642, 'mean_word_length': 4.031578947368421, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2831407', 'n_tokens_mistral': 518, 'n_tokens_neox': 514, 'n_words': 77}