<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using ApprovalTests;
using ApprovalTests.Core;
using ApprovalTests.Namers;
using Castle.MicroKernel;
using Castle.MicroKernel.Handlers;
using Castle.Windsor;
using Castle.Windsor.Diagnostics;
using Castle.Windsor.Diagnostics.DebuggerViews;
using Castle.Windsor.Diagnostics.Helpers;
using NUnit.Framework;
using Approvals = ApprovalTests.Approvals;

namespace ConventionTests
{
	public interface IConventionTest
	{
		string Name { get; }
		void Execute();
	}


	/// <summary>
	///   This is where we set what our convention is all about
	/// </summary>
	public class ConventionData
	{
		/// <summary>
		///   list of assemblies to scan for types that our convention is related to. Can be null, in which case all assemblies starting with 'Als.' will be scanned
		/// </summary>
		public Assembly[] Assemblies { get; set; }

		/// <summary>
		///   Descriptive text used for failure message in test. Should explan what is wrong, and how to fix it (how to make types that do not conform to the convention do so).
		/// </summary>
		public string FailDescription { get; set; }

		/// <summary>
		///   Specifies that there are valid exceptions to the rule specified by the convention.
		/// </summary>
		/// <remarks>
		///   When set to <c>true</c> will run the test as Approval test so that the exceptional cases can be reviewed and approved.
		/// </remarks>
		public bool HasApprovedExceptions { get; set; }

		/// <summary>
		///   This is the convention. The predicate should return <c>true</c> for types that do conform to the convention, and <c>false</c> otherwise<commit_msg>pre-defining predicates for Types and Must properties<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using ApprovalTests;
using ApprovalTests.Core;
using ApprovalTests.Namers;
using Castle.MicroKernel;
using Castle.MicroKernel.Handlers;
using Castle.Windsor;
using Castle.Windsor.Diagnostics;
using Castle.Windsor.Diagnostics.DebuggerViews;
using Castle.Windsor.Diagnostics.Helpers;
using NUnit.Framework;
using Approvals = ApprovalTests.Approvals;

namespace ConventionTests
{
	public interface IConventionTest
	{
		string Name { get; }
		void Execute();
	}


	/// <summary>
	///   This is where we set what our convention is all about
	/// </summary>
	public class ConventionData
	{
        public static readonly Predicate<Type> All = _ => true;
        public static readonly Predicate<Type> Fail = _ => false; 

	    public ConventionData()
	    {
	        Types = All;
	        Must = Fail;
	    }

	    /// <summary>
		///   list of assemblies to scan for types that our convention is related to. Can be null, in which case all assemblies starting with 'Als.' will be scanned
		/// </summary>
		public Assembly[] Assemblies { get; set; }

		/// <summary>
		///   Descriptive text used for failure message in test. Should explan what is wrong, and how to fix it (how to make types that do not conform to the convention do so).
		/// </summary>
		public string FailDescription { get; set; }

		/// <summary>
		///   Specifies that there are valid exceptions to the rule specified by the convention.
		/// </summary>
		/// <remarks>
		///   When set to <c>true</c> will run the test as Approval test so that the exceptional cases can be reviewed and approved.
		/// </remarks>
		public bool HasApprovedExceptions { get; set; }

		/// <summary>
		///   This is the convention. The predicate should return <c>true</c> for types that do conform to the convention, and <c>false</c> otherwise
{'fraction_non_alphanumeric': 0.09980753368160572, 'fraction_numerical': 0.0, 'mean_word_length': 3.3568862275449103, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 41, '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': '2752054', 'n_tokens_mistral': 1079, 'n_tokens_neox': 1011, 'n_words': 409}