dotnet / roslyn-analyzers

MIT License
1.58k stars 464 forks source link

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

Open srivatsn opened 8 years ago

srivatsn commented 8 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 8 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 8 years ago

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