0

I am currently doing research to complete my org's migration to VS 2015, including implementing StyleCop.Analyzers, getting ReSharper settings updated and checked into source control, etc.

One topic I keep coming across is "compatibility" between StyleCop and ReSharper. A Jet Brains dev has even forked classic StyleCop in order to make it "compatible" with ReSharper 9.

What does "compatible" mean here? Is it as simple as making all of ReSharper's default code analysis settings match those in StyleCop, or something more involved?

Our upgrades/changes include:

  • Visual Studio 2010 to 2015
  • ReSharper 8 to 10
  • StyleCop classic to StyleCop.Analyzers

... so I just want to make sure I have my bases covered.

bubbleking
  • 3,329
  • 3
  • 29
  • 49

1 Answers1

1

Is it as simple as making all of ReSharper's default code analysis settings match those in StyleCop, or something more involved?

Yes, pretty much. It's all about keeping the rules in sync so that one doesn't flag an error the other is ignoring.


One thing to watch for on this migration is the version of the R# plugin. I haven't had much joy with ReSharper.StyleCop, but StyleCop by JetBrains 4.8 works fine, plus it is designed to "play nice" with StyleCop.Analyzers.

enter image description here

NikolaiDante
  • 18,469
  • 14
  • 77
  • 117
  • So then, is the issue with the older plugin not "playing nice" simply that you have to edit a lot of rules to make it quit barking? – bubbleking Feb 12 '16 at 15:57
  • IIRC it didn't really work nor give the same level of tooling within R#. Whereas the other one matches up straight away and gives a nice interface within the R# menu screen – NikolaiDante Feb 12 '16 at 16:01
  • Additionally, the ReSharper extension uses StyleCop's own C# parser, rather than ReSharper's, which doesn't help with perf, and doesn't support C# 6, which is why it will prefer the Analyzer if its enabled, so you are definitly doing the right thing in moving to Analyzers over stylecop classic.. – NikolaiDante Feb 12 '16 at 16:47