How to get resharper to skip generated files - resharper

Resharper really complains about files such as reference.cs that is generated by things like WCF service reference. How do I get Resharper to skip such files entirely?

menu ReSharper -> Options
Code inspection -> Settings item
button Edit items to skip

I got this to work by entering Referen?e.cs into the ReSharper Generated file masks list. Apparently the presence of the ? wildcard tricked it into applying to all Reference.cs files (well, remember that it will get files named Referente.cs too, but I can live with that.

Related

Hide specific files in IntelliJ IDEA

I know from Intellij IDEA. Hide .iml files that I can hide from the Project Tool Window specific file extensions on all directories. However, I have unsuccessfully tried to hide specific files (e.g. mymodule/blah.tgz) without getting all tgz files to hide as well. In Settings -> Editor -> File Type, at the bottom, I have tried specifying full and relative paths (e.g. ~/projects/mymodules/blah.tgz) without luck.
How can I achieve this? Is this supported at all? I'm using IntelliJ 14 Ultimate.
Please see the following comment.
How to hide unnecessary files from intellij project view?
I usually use the scope support in Idea to filter in/out files/folders in project tool window and other windows, i.e. Find.
I hope this helps.

Exclude files from Android Studio lint spell checker

The Android Studio lint spell checker flags hex codes that look to it like words in certain files that would be better off unchecked, such as values/colors.xml and build/intermediates/dex-cache/cache.xml.
How do I tell lint to not spell check certain folders or files?
This can be done by using IDE scopes. In Android Studio (at least 3.4) you can configure each inspection per scope. The idea is that you create a scope that contains all files you don't want to be spellchecked, and then switch Spelling inspection off for this scope, but keep it on for everything else.
Add a new scope in Settings / Appearance & Behavior / Scopes that contains all files which you want to exclude from spell checking. For example, this pattern covers all svg files: file:*.svg. In your case it could be like file:*/colors.xml||file:*/cache.xml. IDE will highlight all affected files by green, so you can check if you entered correct pattern.
Then set up Spelling inspection, so that it is OFF for your new scope and ON everywhere else.
Had the same problem with colors.xml
I couldn't find a way to disable the check for a certain file, but I could get rid of the spellcheck on the hex codes.
Click Analyze->Inspect Code.
Choose Whole Project and click OK.
The inspection tool window will open with the results.
You should be able to see the problematic hex codes under Spelling->typo.
Right click any one of them and choose Exclude.
Did the trick for me. HTH

Visual Studio 2012 constantly complaining that a file has been modified outside of the source editor

I am working on a parser, using the parser generator ANTLR in Visual Studio. Naturally, ANTLR is continually regenerating certain files. Every single time it does this, VS has a popup saying:
The file has been modified outside of the source editor.
Do you want to reload it?
The answer I want is always Yes to All.
Is there any way to tell Visual Studioto always assume I want to reload auto-generated files, without prompting?
Click Tools then options then under the environment node on the left choose documents then check the box that says Auto-load changes, if saved:
If you are using Visual Studio's internal editor and you know that nobody else is editing the file, you might be wondering why that happens. In my case, I realized I was working on a continuously backed-up network folder, that's why the file got re-saved every time I made a change on it and saved. So, if you can move your file to a local, not-backed-up folder, that might also solve this problem.

ReSharper - Is there a disable command I can add to a file that will not allow reorder of type members?

Much like
// ReSharper disable ConvertToAutoProperty
I would like to know what, if existing, I can add to particular files (and only particular files) so that fields are not sorted on code cleanup.
For more information:
I know there are settings one can set in R# itself. This needs to work even where I don't control settings (like on other people's computers)
I know I can make a setting to disable sorting for particular types in TypeMembersLayout. This also will not work due to the same reason.
I only want this to happen on files I care that it doesn't happen with, not a global setting.
I've been using Resharper for years, and can say with confidence this option doesn't exist. Good idea though..
Maybe Generated Code options can help you. But I didn't try it.
Go to ReSharper->Options->Code Inspection->Generated Code and add your files.
I think ReSharper leaves such files untouched.

Ignoring missing file error in ReSharper

There are some XML files in the project I'm working on that are included in the project files, but that don't exist (they weren't created by NAnt for some reason). The project is working fine, but ReSharper reports each of the missing files as an error. I know I can ignore ordinary errors, but with these, clicking on the + symbol in “Errors in Solution” does nothing, so I don't know how to ignore them.
Is this possible?
There's an “Ignore Error(s)” button, just mark the errors you want to ignore and click that button.

Resources