StyleCop extension for ReSharper and WinForms
Using the StyleCop extension for ReSharper, most of my code gets analyzed. But my WinForms one does not, and there is a lot of code here that is non-compliant. I can't seem to find a setting that will allow scanning WinForms code. Any thoughts?
Please sign in to leave a comment.
Hello!
As I understand it's not StyleCop related question.
There's R# option which makes it possible to ignore generated code and not analyze it, by default WinForms code is added there.
You can find it in ReSharper | Options | Code Inspections | Generated Code.
Thank you.
Thanks for replying, Angelina. I went ahead and removed the *.Designer.cs and *.Generated.cs, but that did not make a difference for me. The WinForm filename is filename.cs.
Thank you for the reply.
Just to make it clear: have you also removed Windows Form generated code from 'Generated Code regions' section on the same options page?
Thank you.
I'm afraid that didn't make a difference. Violations are still not being found in this file. The name of it is "IBRRepaymentCalculator.cs", in case that makes a difference (like maybe it thinks it is an interface and shouldn't be looked at?).
Here is my build info if that makes a difference:
JetBrains ReSharper Ultimate 2017.1.3 Build 108.0.20170613.154143
ReSharper 2017.1.20170613.155418
Application Packages:
JetBrains Platform Core Ide build 108.0.20170613.154143 on 2017-06-13 15:41:48Z rev git::refs/heads/wave08-eap10-2017.1.3.
JetBrains Platform Core Shell build 108.0.20170613.153742 on 2017-06-13 15:37:48Z rev git::refs/heads/wave08-eap10-2017.1.3::60628e4fe836cd671dfa5f04eea250368c8a96b4
.
JetBrains Platform Core Text build 108.0.20170613.154143 on 2017-06-13 15:41:48Z rev git::refs/heads/wave08-eap10-2017.1.3.
JetBrains Platform Installer build 108.0.20170613.154143 on 2017-06-13 15:41:48Z rev git::refs/heads/wave08-eap10-2017.1.3.
JetBrains Platform Interop dotMemoryUnit Framework build 108.0.20170613.154143 on 2017-06-13 15:41:48Z rev git::refs/heads/wave08-eap10-2017.1.3.
JetBrains Platform Interop dotMemoryUnit Interop build 108.0.20170613.154143 on 2017-06-13 15:41:48Z rev git::refs/heads/wave08-eap10-2017.1.3.
JetBrains Platform Interop dotMemoryUnit Interop.Ide build 108.0.20170613.154143 on 2017-06-13 15:41:48Z rev git::refs/heads/wave08-eap10-2017.1.3.
JetBrains Platform RdProtocol build 108.0.20170613.154143 on 2017-06-13 15:41:48Z rev git::refs/heads/wave08-eap10-2017.1.3.
JetBrains Platform Symbols build 108.0.20170613.154143 on 2017-06-13 15:41:48Z rev git::refs/heads/wave08-eap10-2017.1.3.
JetBrains Platform VisualStudio build 108.0.20170613.154143 on 2017-06-13 15:41:48Z rev git::refs/heads/wave08-eap10-2017.1.3.
JetBrains Psi.Features Core build 108.0.20170613.154646 on 2017-06-13 15:46:52Z rev git::refs/heads/wave08-eap10-2017.1.3::6f631cd9459e83e84e6b15b8e0cb9bad4bb8f375
.
JetBrains Psi.Features SolutionBuilder build 108.0.20170613.154646 on 2017-06-13 15:46:52Z rev git::refs/heads/wave08-eap10-2017.1.3::6f631cd9459e83e84e6b15b8e0cb9bad4bb8f375
.
JetBrains Psi.Features src build 108.0.20170613.154646 on 2017-06-13 15:46:52Z rev git::refs/heads/wave08-eap10-2017.1.3::6f631cd9459e83e84e6b15b8e0cb9bad4bb8f375
.
JetBrains Psi.Features Tasks build 108.0.20170613.154646 on 2017-06-13 15:46:52Z rev git::refs/heads/wave08-eap10-2017.1.3::6f631cd9459e83e84e6b15b8e0cb9bad4bb8f375
.
JetBrains Psi.Features UnitTesting build 108.0.20170613.154646 on 2017-06-13 15:46:52Z rev git::refs/heads/wave08-eap10-2017.1.3::6f631cd9459e83e84e6b15b8e0cb9bad4bb8f375
.
JetBrains Psi.Features VisualStudio build 108.0.20170613.154646 on 2017-06-13 15:46:52Z rev git::refs/heads/wave08-eap10-2017.1.3::6f631cd9459e83e84e6b15b8e0cb9bad4bb8f375
.
JetBrains ReSharper src build 108.0.20170613.155418 on 2017-06-13 15:54:28Z rev git::refs/heads/wave08-eap10-2017.1.3::7e832fe5921a06430775ae4474ea6a3ac7788412
.
JLebosquain EnhancedTooltip build 3.2.1 on 2017-08-01 17:22:54Z.
StyleCop StyleCop build 2017.1.2-pre001 on 2017-08-01 17:22:54Z.
I noticed that, if I choose Inspect...Next issue in file, it says "Analysis is turned off". Maybe that helps to diagnose my issue?
Thank you for the reply.
Could you please check that the specified file is not listed in:
Thank you.
Just checked, and those are all blank. Thanks for continuing to try.
Thank you for the information.
Is there any chance you could provide the solution and your settiings from all layers via ReSharper | Manage options?
Thank you.
I verified with our IT director, and that would be fine. Since the code is IP, I would need to send it directly to you (assuming you are with JetBrains) and not post it wide-open. How can I submit this, please?