<commit_before>using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using FlubuCore.Context;
using FlubuCore.Scripting;
using FlubuCore.Tasks;

namespace FlubuCore.Targeting
{
    public class Target : TaskBase<int, Target>, ITargetInternal
    {
        private readonly Dictionary<string, TaskExecutionMode> _dependencies = new Dictionary<string, TaskExecutionMode>();

        private readonly List<TaskGroup> _taskGroups = new List<TaskGroup>();

        private readonly CommandArguments _args;

        private readonly TargetTree _targetTree;

        internal Target(TargetTree targetTree, string targetName, CommandArguments args)
        {
            _targetTree = targetTree;
            TargetName = targetName;
            _args = args;
        }

        public Dictionary<string, TaskExecutionMode> Dependencies => _dependencies;

        public List<TaskGroup> TasksGroups => _taskGroups;
<commit_msg>Target name validation.<commit_after>using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using FlubuCore.Context;
using FlubuCore.Scripting;
using FlubuCore.Tasks;

namespace FlubuCore.Targeting
{
    public class Target : TaskBase<int, Target>, ITargetInternal
    {
        private readonly Dictionary<string, TaskExecutionMode> _dependencies = new Dictionary<string, TaskExecutionMode>();

        private readonly List<TaskGroup> _taskGroups = new List<TaskGroup>();

        private readonly CommandArguments _args;

        private readonly TargetTree _targetTree;

        internal Target(TargetTree targetTree, string targetName, CommandArguments args)
        {
            if (targetName.Any(x => char.IsWhiteSpace(x)))
            {
                throw new ScriptException("Target name must not contain whitespaces.");
            }

            _targetTree = targetTree;
            TargetName = targetName;
            _args = args;
        }

        public Dictionary<string, TaskExecutionMode> Dependencies => _dependencies;

        public List<TaskGroup> TasksGroups => _taskGroups;

{'fraction_non_alphanumeric': 0.07440758293838863, 'fraction_numerical': 0.0, 'mean_word_length': 3.2732793522267207, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 22, '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': '1050631', 'n_tokens_mistral': 535, 'n_tokens_neox': 518, 'n_words': 145}