public SonarAnalyzerLegacyConnectedWorkflow(Workspace workspace, ISuppressionHandler suppressionHandler, ILogger logger) : base(workspace) { if (suppressionHandler == null) { throw new ArgumentNullException(nameof(suppressionHandler)); } if (logger == null) { throw new ArgumentNullException(nameof(logger)); } this.logger = logger; this.shouldDiagnosticBeReportedFunc = ShouldIssueBeReported; this.suppressionHandler = suppressionHandler; // Inject the delegate into any Sonar analyzer assemblies that are already loaded foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) { InjectSuppressionDelegate(asm); } // Monitor assemblies as they are loaded and inject the delegate if necessary AppDomain.CurrentDomain.AssemblyLoad += OnAssemblyLoad; }
public SonarAnalyzerConnectedWorkflow(Workspace workspace, IQualityProfileProvider qualityProfileProvider, BoundSonarQubeProject boundProject, ISuppressionHandler suppressionHandler) : base(workspace) { if (qualityProfileProvider == null) { throw new ArgumentNullException(nameof(qualityProfileProvider)); } if (boundProject == null) { throw new ArgumentNullException(nameof(boundProject)); } if (suppressionHandler == null) { throw new ArgumentNullException(nameof(suppressionHandler)); } this.qualityProfileProvider = qualityProfileProvider; this.boundProject = boundProject; this.suppressionHandler = suppressionHandler; SonarAnalysisContext.ReportDiagnostic = VsixAnalyzerReportDiagnostic; }
public SonarAnalyzerConnectedWorkflow(Workspace workspace, ISuppressionHandler suppressionHandler) : base(workspace) { if (suppressionHandler == null) { throw new ArgumentNullException(nameof(suppressionHandler)); } this.suppressionHandler = suppressionHandler; SonarAnalysisContext.ReportDiagnostic = VsixAnalyzerReportDiagnostic; }
public TestableSonarAnalyzerLegacyConnectedWorkflow(ISuppressionHandler suppressionHandler, ILogger logger) : base(new AdhocWorkspace(), suppressionHandler, logger) { }