<commit_before>//
// Result+Summary.swift
// ValidationToolkit iOS
//
// Created by <NAME> on 4/17/19.
// Copyright © 2019 iOS NSAgora. All rights reserved.
// 
// 

import Foundation


public extension ValidationResult {
    /**
     The summary of a validation result.
     */
    struct Summary {
        
        /**
         `[Error]` if the validation result is `.failure`, `nil` otherwise.
         */
        public private(set) var errors = [Error]()
        
        /**
         The number of failing constraints for a `.failure` result, `0` otherwise.
         */
        public var failingConstraints: Int {
            return errors.count
        }
        
        /**<commit_msg>Remove file header comments. Contribution is visible trough github profile<commit_after>import Foundation

public extension ValidationResult {
    /**
     The summary of a validation result.
     */
    struct Summary {
        
        /**
         `[Error]` if the validation result is `.failure`, `nil` otherwise.
         */
        public private(set) var errors = [Error]()
        
        /**
         The number of failing constraints for a `.failure` result, `0` otherwise.
         */
        public var failingConstraints: Int {
            return errors.count
        }
        
        /**
{'fraction_non_alphanumeric': 0.10238645111624327, 'fraction_numerical': 0.008468052347959968, 'mean_word_length': 1.7027027027027026, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '6879053', 'n_tokens_mistral': 341, 'n_tokens_neox': 324, 'n_words': 114}