-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ReSharper settings information #91
Conversation
I've added information on how to edit and save ReSharper settings. I am using ReSharper 2016.1.1 but guess the steps are the same for older versions. Regarding the issue you had with using statements being added within the namespace and not at the top of the file, I assume that is due to the ReSharper setting add 'using' directive to the deepest scope in the C# Code Style section of the ReSharper configuration. You can read more about it on JetBrains webpage. Since the team-shared configuration doesn't state that imported namespaces should be added to the deepest scope, I assume that you have a personal ReSharper settings file that overrides the team-shared. That would be a file named CUITe.sln.DotSettings.user. If existing, try to remove that file and see what happens. |
@icnocop Did the previous description solve your problem? |
Your name seems to pop up everywhere, I just saw it on Docker Toolbox. Have you had time to look at the PR? |
Thank you for the pull request and your patience. I will take a look in the next couple days, if not today. I've updated my version of ReSharper to 2016 yesterday so I can test. :) |
Clarification: ReSharper will not warn you when the using statements are inside the namespace (there doesn't seem to exist such a rule), but having add 'using' directive to the deepest scope unchecked, as you do in all layers of your settings, should prevent ReSharper to add them there if a using statement is missing and you use the ReSharper light bulb to fix the problem. You can try that by removing To summarize, with the current configuration ReSharper will add missing using statements before the namespace is declared which is the behavior we want (I guess), but there is no way to configure ReSharper to warn if the using statement is within the namespace. I am sorry if I let you believe otherwise. If everything else is to your satisfaction, tell me so and I'll merge the PR. |
Can we get StyleCop to provide a warning or error message about this non-conforming coding style? |
No I don't think so. We can give StyleCop a try if you wan't, my guess is that it supports this kind of configuration. |
StyleCop has rule SA1200 which we can use to enforce consistency within our code. |
Sorry, I misread your comment from May 24. I thought you where referring to ReSharper when I said I didn't think so. Yes, StyleCop can find these syntax problems. I have some experience with StyleCop Analyzers and we can incorporate that in CUITe. But I would like to do that in a separate PR if possible. Is that ok for you? |
Yes, I think StyleCop Analyzers is the way to go, and it can be in a separate PR. I think this PR can be merged if it still applies. StyleCop Analyzers requires Visual Studio 2015, so we should also upgrade the CUITe.sln file to open in Visual Studio 2015 by default. Thank you! :) |
No description provided.