예제 #1
0
        string CreateAnalyzerBlock(ILookup <string, string> otherArguments, Assembly assembly)
        {
            return(GenerateAnalyserItemGroup(otherArguments["analyzer"].Concat(otherArguments["a"])
                                             .SelectMany(x => x.Split(';'))
#if UNITY_2020_2_OR_NEWER
                                             .Concat(assembly.compilerOptions.RoslynAnalyzerDllPaths)
#else
                                             .Concat(m_AssemblyNameProvider.GetRoslynAnalyzerPaths())
#endif
                                             .Distinct()
                                             .Select(path => MakeAbsolutePath(path, ProjectDirectory).NormalizePath())
                                             .ToArray()));
        }
예제 #2
0
        string[] RetrieveRoslynAnalyzers(Assembly assembly, ILookup <string, string> otherArguments)
        {
#if UNITY_2020_2_OR_NEWER
            return(otherArguments["analyzer"].Concat(otherArguments["a"])
                   .SelectMany(x => x.Split(';'))
#if !ROSLYN_ANALYZER_FIX
                   .Concat(m_AssemblyNameProvider.GetRoslynAnalyzerPaths())
#else
                   .Concat(assembly.compilerOptions.RoslynAnalyzerDllPaths)
#endif
                   .Select(MakeAbsolutePath)
                   .Distinct()
                   .ToArray());
#else
            return(otherArguments["analyzer"].Concat(otherArguments["a"])
                   .SelectMany(x => x.Split(';'))
                   .Distinct()
                   .Select(MakeAbsolutePath)
                   .ToArray());
#endif
        }
 private IEnumerable <string> GetAllRoslynAnalyzerPaths()
 {
     return(m_AssemblyNameProvider.GetRoslynAnalyzerPaths());
 }