Add analyzer support

With this change, any referenced analyzer project will be parsed by the
project system and the assemblies will be passed down to the compiler.
By default, the analyzer language is considered to be "cs". If another
language is used, the "languageID" option should be specified inside the
"analyzerOptions" section of the project.json file.

Resolves #83
This commit is contained in:
Andy Gocke 2016-01-18 15:14:19 -08:00
parent ea43482551
commit c716ad6571
13 changed files with 307 additions and 26 deletions

View file

@ -27,6 +27,14 @@ namespace Microsoft.DotNet.Tools.Compiler
return compilerName;
}
public static string ResolveLanguageId(ProjectContext context)
{
var languageId = context.ProjectFile.AnalyzerOptions?.LanguageId;
languageId = languageId ?? "cs";
return languageId;
}
public struct NonCultureResgenIO
{