<commit_before>using System.Collections.Generic;
using System.Linq;
using FlubuCore;
using FlubuCore.Scripting;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.Extensions.CommandLineUtils;

namespace DotNet.Cli.Flubu.Commanding
{
    public class FlubuCommandParser : IFlubuCommandParser
    {
        private readonly CommandLineApplication _commandApp;

        private readonly IFlubuConfigurationProvider _flubuConfigurationProvider;

        private CommandArgument _command;

        private CommandOption _configurationOption;

        private CommandOption _outputOption;

        private CommandArguments _parsed;

        private CommandOption _scriptPath;

        private CommandOption _targetsToExecute;

        private CommandOption _parallelTargetExecution;

        private CommandOption _isDebug;

        private CommandOption _configurationFile;

        private CommandOption _assemblyDirectories;

        private CommandOption _noDependencies;

        public FlubuCommandParser(
            CommandLineApplication commandApp,
            IFlubuConfigurationProvider flubuConfigurationProvider)
        {
            _commandApp = commandApp;
            _flubuConfigurationProvider = flubuConfigurationProvider;
        }

        public CommandArguments Parse(string[] args)
        {
            _parsed = new CommandArguments();

            _commandApp.HelpOption("-?|-h|--help");

            _command = _commandApp.Argument("<COMMAND> [arguments]", "The command to execute", true);

            _scriptPath = _commandApp.Option("-s|--script <SCRIPT>", "Build script file to use.", CommandOptionType.SingleValue);
            _parallelTargetExecution = _commandApp.Option("--parallel", "If applied target's are executed in parallel", CommandOptionType.NoValue);
            _targetsToExecute = _commandApp.Option("-tte|--targetsToExecute <TARGETS_TO_EXECUTE>", "Target's that must be executed. Otherwise fails.", CommandOptionType.SingleValue);
            _isDebug = _commandApp.Option("-d|--debug", "Enable debug logging.", CommandOptionType.NoValue);
            _configurationFile = _commandApp.Option("-cf|--configurationFile", "Path to the flubu json configuration file. If not specified configuration is readed from flubusettings.json ", CommandOptionType.SingleValue);
            _assemblyDirectories = _commandApp.Option("-ass", "Directory to search assemblies to include automatically in script (Assemblies in subdirectories are also loaded). If not specified assemblies are loaded by default from FlubuLib directory.", CommandOptionType.MultipleValue);
            _noDependencies = _commandApp.Option("-nd||--nodeps||--noDependencies", "If applied no target dependencies are executed.", CommandOptionType.NoValue);
            _commandApp.OnExecute(() => PrepareDefaultArguments());

            if (args == null)
            {<commit_msg>removed long version of --nodeps<commit_after>using System.Collections.Generic;
using System.Linq;
using FlubuCore;
using FlubuCore.Scripting;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.Extensions.CommandLineUtils;

namespace DotNet.Cli.Flubu.Commanding
{
    public class FlubuCommandParser : IFlubuCommandParser
    {
        private readonly CommandLineApplication _commandApp;

        private readonly IFlubuConfigurationProvider _flubuConfigurationProvider;

        private CommandArgument _command;

        private CommandOption _configurationOption;

        private CommandOption _outputOption;

        private CommandArguments _parsed;

        private CommandOption _scriptPath;

        private CommandOption _targetsToExecute;

        private CommandOption _parallelTargetExecution;

        private CommandOption _isDebug;

        private CommandOption _configurationFile;

        private CommandOption _assemblyDirectories;

        private CommandOption _noDependencies;

        public FlubuCommandParser(
            CommandLineApplication commandApp,
            IFlubuConfigurationProvider flubuConfigurationProvider)
        {
            _commandApp = commandApp;
            _flubuConfigurationProvider = flubuConfigurationProvider;
        }

        public CommandArguments Parse(string[] args)
        {
            _parsed = new CommandArguments();

            _commandApp.HelpOption("-?|-h|--help");

            _command = _commandApp.Argument("<COMMAND> [arguments]", "The command to execute", true);

            _scriptPath = _commandApp.Option("-s|--script <SCRIPT>", "Build script file to use.", CommandOptionType.SingleValue);
            _parallelTargetExecution = _commandApp.Option("--parallel", "If applied target's are executed in parallel", CommandOptionType.NoValue);
            _targetsToExecute = _commandApp.Option("-tte|--targetsToExecute <TARGETS_TO_EXECUTE>", "Target's that must be executed. Otherwise fails.", CommandOptionType.SingleValue);
            _isDebug = _commandApp.Option("-d|--debug", "Enable debug logging.", CommandOptionType.NoValue);
            _configurationFile = _commandApp.Option("-cf|--configurationFile", "Path to the flubu json configuration file. If not specified configuration is readed from flubusettings.json ", CommandOptionType.SingleValue);
            _assemblyDirectories = _commandApp.Option("-ass", "Directory to search assemblies to include automatically in script (Assemblies in subdirectories are also loaded). If not specified assemblies are loaded by default from FlubuLib directory.", CommandOptionType.MultipleValue);
            _noDependencies = _commandApp.Option("-nd||--nodeps", "If applied no target dependencies are executed.", CommandOptionType.NoValue);
            _commandApp.OnExecute(() => PrepareDefaultArguments());

            if (args == null)
            {
{'fraction_non_alphanumeric': 0.07837697242933934, 'fraction_numerical': 0.0, 'mean_word_length': 3.488715953307393, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '1552304', 'n_tokens_mistral': 1398, 'n_tokens_neox': 1349, 'n_words': 370}