<commit_before>﻿using System;
using System.Text.RegularExpressions;

namespace clipr.Core
{
    internal static class ArgumentValidation
    {
        public static bool IsAllowedShortName(char c)
        {
            return Char.IsLetter(c);
        }

        internal const string IsAllowedShortNameExplanation =
            "Short arguments must be letters.";

        public static bool IsAllowedLongName(string name)
        {
            return name != null &&
                Regex.IsMatch(name, @"^[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9]$");
        }

        internal const string IsAllowedLongNameExplanation =
            "Long arguments must begin with a letter, contain a letter, " +
            "digit, or hyphen, and end with a letter or a digit.";
    }
}<commit_msg>Enable underscore in middle of long name.<commit_after>﻿using System;
using System.Text.RegularExpressions;

namespace clipr.Core
{
    internal static class ArgumentValidation
    {
        public static bool IsAllowedShortName(char c)
        {
            return Char.IsLetter(c);
        }

        internal const string IsAllowedShortNameExplanation =
            "Short arguments must be letters.";

        public static bool IsAllowedLongName(string name)
        {
            return name != null &&
                Regex.IsMatch(name, @"^[a-zA-Z][a-zA-Z0-9\-_]*[a-zA-Z0-9]$");
        }

        internal const string IsAllowedLongNameExplanation =
            "Long arguments must begin with a letter, contain a letter, " +
            "digit, underscore, or hyphen, and end with a letter or a digit.";
    }
}
{'fraction_non_alphanumeric': 0.0924422236102436, 'fraction_numerical': 0.004996876951905059, 'mean_word_length': 2.1848906560636183, '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': '6590721', 'n_tokens_mistral': 456, 'n_tokens_neox': 432, 'n_words': 129}