Open blairmcg opened 8 years ago
@heejaechang How does v2 engine deal with duplicate analyzers from VSIX and NuGet package?
Moving over to Heejae as the fix (if not implemented already) should go in v2 engine de-dupe logic.
v2 de-dup logic is same as v1. vsix gets higher priority over nuget as long as analyzer reference identity is same. analyzer reference de-dup is based on analyzer reference identity they claim if 2 versions return different identity then they are 2 different analyzer references and we can't de-dup those.
by the way, this is breaking change (prefering nuget package over vsix assuming analyzer reference ids are same)
adding @dotnet/roslyn-analysis since I am not sure what is right resolution for this.
currently, what the issue requests is not how it works. our analyzer reference id do includes assembly version so to support what is described here will require several breaking changes.
I think we need some kind of dedicated option panel to configure all those little things some people want to tweak. not only this but others like which analyzers runs when and etc.
moving it to next milestone
@srivatsn this need design. making milestone unknown.
Design discussion here https://github.com/dotnet/roslyn/issues/18818
At present if I have an analyser installed as a VSIX and configured into a project through nuget, then the analysis does only run once iff the versions are exactly the same (not sure which is used, however). In team scenarios configuration of analyzers and rulesets through explicit settings in projects (i.e. using the nuget option), is a far better option than installing a VSIX as it allows a consistent configuration to be shared so that all team members see the same analysis results when looking at the same code. The current VSIX mechanism does not mesh well with this, however. Ideally a VSIX-based analyser should be disabled for a project for which the same analyser is explicitly configured as a nuget import. This should happen regardless of version, i.e. even if the nuget is older, because it is of paramount importance that all team members get a consistent result. Explicit configuration should be favoured over implicit, and consistency should be favoured over being up to date, and obviously one does not want to see duplicate results from running the same analysis rules more than once.