<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Task = SIM.Sitecore9Installer.Tasks.Task;

namespace SIM.Sitecore9Installer.Validation.Validators
{
  public abstract class BaseValidator:IValidator
  {
    public BaseValidator()
    {
      this.Data = new Dictionary<string, string>();
    }

    public virtual IEnumerable<ValidationResult> Evaluate(IEnumerable<Task> tasks)
    {
      List<ValidationResult> results = new List<ValidationResult>();
      foreach (Task task in tasks)
      {
        IEnumerable<InstallParam> tParams = task.LocalParams.Where(p => this.GetParamNames().Contains(p.Name));
        if (tParams.Any())
        {
          results.AddRange(this.GetErrorsForTask(task,tParams));
        }
      }

      if (!results.Any())
      {
        results.Add(new ValidationResult(ValidatorState.Success, string.Empty, null));<commit_msg>Fix erros after rebase. #381<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Task = SIM.Sitecore9Installer.Tasks.Task;

namespace SIM.Sitecore9Installer.Validation.Validators
{
  public abstract class BaseValidator:IValidator
  {
    public BaseValidator()
    {
      this.Data = new Dictionary<string, string>();
    }

    public virtual IEnumerable<ValidationResult> Evaluate(IEnumerable<Task> tasks)
    {
      List<ValidationResult> results = new List<ValidationResult>();
      foreach (Task task in tasks)
      {
        IEnumerable<InstallParam> tParams = task.LocalParams.Where(p => !this.GetParamNames().Any()|| this.GetParamNames().Contains(p.Name));
        if (tParams.Any()||!task.LocalParams.Any())
        {
          results.AddRange(this.GetErrorsForTask(task,tParams));
        }
      }

      if (!results.Any())
      {
        results.Add(new ValidationResult(ValidatorState.Success, string.Empty, null));
{'fraction_non_alphanumeric': 0.11686991869918699, 'fraction_numerical': 0.003556910569105691, 'mean_word_length': 3.5684454756380513, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, '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': '4441368', 'n_tokens_mistral': 564, 'n_tokens_neox': 555, 'n_words': 108}