Search code examples
c#resharperstylecop

Format Line not actually formatting.


I have Resharper 9 installed and StyleCop as I'm trialling then to see if my work should get the tools installed for all developers (So I'm very new to using both tools).

StyleCop has a number of rules that affect line formatting, such as: SA1116. Resharper then picks up when these rules are violated and it offers the option to have it automatically fixed (as you can see below).

enter image description here

The only problem is when I actually hit enter nothing happens. Well nothing happens 80% of the time for this rule violation as well as for a bunch of the other formatting issues such as a space between a cast and a variable (e.g. (double) myDouble;)

It seems so erratic, does anybody know how to improve this or is it simply credit to StyleCop not completely integrating with Resharper? (In which case should I stop looking at recharper/stylecop combo as a "press button to fix" tool and more like "here's a warning, your welcome. Now if there's a button, press it you're lucky")

Cheers,


Solution

  • It might be worth raising this as an issue with the StyleCop project on CodePlex. However, the CodePlex project seems to be a bit abandoned - the current ReSharper 9 plugin is provided by a community member. There's a GitHub repo (although it doesn't have source) that you could use to try and file an issue.