I downloaded StyleCop 4.6.3 which integrates with ReSharper 6 and the results are really fantastic!
However on a specific project I would like to disable the StyleCop warnings (temporarily) and enable again later on.
Is there any way of doing this? I can't seem to find it on the ReSharper menu (options, etc).
You can use different Settings.Stylecop settings for each project, just create one that ignores all the rules. Right click on a project and select Stylecop settings to modify them.
I think you can also disable plugins by unticking them from ReSharper->Plugins... (in version 5.1, not sure if it's the same in 6.0)
Related
I am used to CLion in the past, and now I want to try ReSharper. Can I sync the settings of Clion to ReSharper?
CLion can export settings into clion-settings.zip, but ReSharper expects to import from .DotSettings.
How to set ReSharper's settings by using the settings from CLion?
You can't, they are two different products. Some of their features may overlap with each other but their settings will be very different. You will need to configure ReSharper's settings to match your CLion ones manually.
I am using AndroidStudio to build NDK based applications with C and C++ code.
The IDE goes overboard with warnings, like the one below:
How can I disable this and other gratuitous warnings from the IDE?
Is this done on a per-project base, or an IDE setting?
In any case, the deluge of warnings are not helping.
Ubuntu LTS
Android Studio 3.5
Native code built via gradle/cmake.
Release notes of Android Studio state:
Android Studio now includes support for static code analysis using
Clang-Tidy for projects that include native code. To enable support
for Clang-Tidy, update your NDK to r18 or higher. You can then enable
or re-enable the inspections by opening the Settings or Preferences
dialog and navigating to Editor > Inspections > C/C++ > General >
Clang-Tidy. When selecting this inspection in the Settings or
Preferences dialog, you can also see the list of Clang-Tidy checks
that are enabled and disabled under the Option section of the
right-most panel.
To disable the warnings just go to:
Preferences->Editor->Inspections->C/C++->General->Clang-tidy
and uncheck Clang-tidy or edit the list of checks to disable those that annoy you.
We have a VS solution which has StyleCop configured.
Because I do use ReSharper I wanted my scaffolding to work alongside stylecop. Fortunately there is a plugin named "StyleCop by Resharper Plugin".
After installing "StyleCop by Resharper Plugin" every VS solution that I open will be proofchecked according to "some" stylecop rules.
For me this is confusing as only one solution has Stylecop.settings file, and the analyzers package installed.
How to make stylecop proofcheck only the configured solution.
P.S. I don't want to include ignores in all my solutions because of one project using stylecop.
If you are using Visual Studio 2015 or 2017 then you could use the StyleCop.Analyzers NuGet package that will use the Roslyn analyzers. This can then be applied per project.
Im a great fan of resharper, and used to use the stylecop for resharper plugin a while back.
I wanted to use it again today but the stylecop for resharper codeplex site says that stylecop for resharper is now integrated into stylecop.
So I installed stylecop (4.6), but my resharper (5.1) appears to be unchanged.
I particularly liked using the code formatting settings that were included in the stylecop for resharper package (I think the file was 'StyleCopCodeStyle.xml', which could be used in the resharper options to set the code formatting and cleanup behaviour) - this xml file is now gone.
Am I missing something. Theres zero doumentation about this stylecop/resharper marriage, and I clueless as to what I am actually getting
Can anyone shed some light on this ?
Just an update for ReSharper 9:
To install ReSharper & StyleCop together follow these steps:
Close all Visual Studio Applications (Important!!).
Install ReSharper by double clicking the executable and following the installation process. This step will require administration rights (most likely). The precise steps to follow are unknown as they are likely to be different in the trial versus full version.
Download the stylecop msi file from here: https://stylecop.codeplex.com/releases/view/79972
Install it by double clicking and following a standard install process.
NOTE: It might be required to move the install files into a different directory from C: because otherwise if the user does not have administration rights they will not be able to supress rules.
Open Visual studio and there should be a new menu item in the top menu bar called ReSharper. Select Extension Manager…
A new window should open with a list of all of the possible extensions for resharper. Search (top right of the window) for “ReSharper.StyleCop” and press the install button.
Follow the basic installation instructions for this add-on.
Restart visual studio.
All done!!
On the StyleCop project home page, it is quite clearly states that StyleCop 4.5 is the version that is compatible with Resharper 5.1.
Our project already has a StyleCop configuration. I am using ReSharper and I would like to be able to have R# use the StyleCop settings.
I know that you can use StyleCopForResharper to build the settings in Resharper and export them as a StyleCop configuration, but can you do the reverse and have Resharper consume the existing StyleCop config?
I am not sure is this post still actual. There is free StyleCop for ReSharper at CodePlex.
It uses StyleCop assembly so it will use project file settings.
I don't know of any way to do this, but it is possible for R# to layout your members/properties/methods etc. to comply with StyleCop. Check out my blog post at http://stevedunns.blogspot.com/2009/03/halt-this-is-stylecop-you-are-in.html.
HTH.
Steve