Skip to content

Instantly share code, notes, and snippets.

@joymon
Created June 3, 2015 03:35
Show Gist options
  • Save joymon/5300b07d2ea88c612768 to your computer and use it in GitHub Desktop.
Save joymon/5300b07d2ea88c612768 to your computer and use it in GitHub Desktop.
private CompilationWithAnalyzers GetAnalyzerAwareCompilation(Compilation compilation)
{
ImmutableArray<DiagnosticAnalyzer> analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new TypeNameShouldStartWithCapitalLetterDiagnosticAnalyzer());
CompilationWithAnalyzers compilationWithAnalyzers = new CompilationWithAnalyzers(compilation, analyzers,
GetAnalyzerOptions(),
new CancellationToken());
return compilationWithAnalyzers;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment