Exemplo n.º 1
0
        private static void GetReport(ConsoleSwitches arguments, ReleaseExtractor extractor, BPRunner bpRunner)
        {
            var profile = RuleProfile.LoadFromFile();
            var rules   = bpRunner.GetRulesFromProfile(profile);
            var results = bpRunner.RunProfile(profile, extractor.Release);
            var report  = new ExcelOutputGenerator();

            report.CreateReport(arguments.ReportFile.FullName, profile, rules, results, extractor.Release);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Main entry point to the application
        /// </summary>
        /// <param name="args">Arguments</param>
        static void Main(string[] args)
        {
            /// Provides a way to parse the arguments <see cref="https://gist.github.com/marinoscar/d84265533b242a8a5e7eb74cdd50b7e5"/>
            var arguments = new ConsoleSwitches(args);

            RunAction(() =>
            {
                DoCodeReviewReport(arguments);
            }, true);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Executes an action on the application
        /// </summary>
        /// <param name="arguments"></param>
        static void DoCodeReviewReport(ConsoleSwitches arguments)
        {
            if (!arguments.HasSourceFile)
            {
                throw new ArgumentException("Release file not provided");
            }
            var extractor = new ReleaseExtractor(File.ReadAllText(arguments.SourceFile.FullName));

            extractor.Load();
            var bpRunner = new BPRunner();

            bpRunner.RuleRun += BpRunner_RuleRun;
            GetReport(arguments, extractor, bpRunner);
        }