dotnet / roslyn-analyzers

MIT License
1.59k stars 466 forks source link

Advise against mixing both C# and VB analyzers in the same dll. #356

Open srivatsn opened 9 years ago

srivatsn commented 9 years ago

Author a new rule in the Codeanalysis analyzer project to catch this issue:

If an analyzer dll references both Microsoft.CSharp and Microsoft.VisualBasic, that would pull in both languages into memory which is wasteful. Instead, factor the analyzes such that you have:

and then the package authoring should only installe MyAnalyzer.dll and MyAnalyzer.CSharp.dll for C# projects. .

genlu commented 9 years ago

This will be the case after all existing analyzers are moved into their new factoring. Are you saying that you want to change how we build analyzers currently in master?

srivatsn commented 9 years ago

No I'm saying we need to a rule to Microsoft.CodeAnalysis.Analyzers so that other analyzer authors can follow this pattern.