Exemplo n.º 1
0
 public DifferentialReporter(DifferentialOptions options, string file)
 {
     _currentFilePath = file;
     _teamcityService = new TeamCityServiceClient(options.TeamCityUrl, options.TeamCityToken);
     _webhook         = options.Webhook;
     _buildId         = options.BuildId;
     _output          = options.Output;
     _gitPath         = options.Git;
 }
        private static void Run(DifferentialOptions options)
        {
            var files = Directory.EnumerateFiles(options.Folder, "dupfinder-report-*.xml");
            var file  = files.FirstOrDefault();

            if (file == null)
            {
                throw new ArgumentNullException(nameof(file), $"No report file in directory {options.Folder}");
            }

            Console.WriteLine($"[Analysis] File: {file}");

            var reporter = new DifferentialReporter(options, file);

            reporter.RunAsync().Wait();
        }