private bool CheckAnalyzers(
     string baseDirectory,
     ImmutableArray <CommandLineAnalyzerReference> analyzers,
     [NotNullWhen(false)] out List <string>?errorMessages
     )
 {
     return(AnalyzerConsistencyChecker.Check(
                baseDirectory,
                analyzers,
                AnalyzerAssemblyLoader,
                Logger,
                out errorMessages
                ));
 }
Exemple #2
0
        public static BuildResponse RunCompiler(
            string clientDirectory,
            string[] args,
            string baseDirectory,
            string sdkDirectory,
            string libDirectory,
            IAnalyzerAssemblyLoader analyzerLoader,
            CancellationToken cancellationToken)
        {
            var  compiler   = new VisualBasicCompilerServer(args, clientDirectory, baseDirectory, sdkDirectory, libDirectory, analyzerLoader);
            bool utf8output = compiler.Arguments.Utf8Output;

            if (!AnalyzerConsistencyChecker.Check(baseDirectory, compiler.Arguments.AnalyzerReferences, analyzerLoader))
            {
                return(new AnalyzerInconsistencyBuildResponse());
            }

            TextWriter output     = new StringWriter(CultureInfo.InvariantCulture);
            int        returnCode = compiler.Run(output, cancellationToken);

            return(new CompletedBuildResponse(returnCode, utf8output, output.ToString(), string.Empty));
        }
 public override bool CheckAnalyzers(string baseDirectory, ImmutableArray <CommandLineAnalyzerReference> analyzers)
 {
     return(AnalyzerConsistencyChecker.Check(baseDirectory, analyzers, s_analyzerLoader));
 }
 private bool CheckAnalyzers(string baseDirectory, ImmutableArray <CommandLineAnalyzerReference> analyzers)
 {
     return(AnalyzerConsistencyChecker.Check(baseDirectory, analyzers, AnalyzerAssemblyLoader));
 }