Exclude ReSharper error for "Resource not found" inside Views - asp.net-mvc-2

I have an MVC2 application and use ReSharper 6.1 - I've heavily customised the Code Inspection Severity and edited what it decides to show as errors, warnings, suggestions and hints, but I cannot seem to stop it from telling me that a specific resource is missing when utilising a HTMLHelper.
So, for instance:
<img src="<%:Url.Content("~/Resources/Image12345.jpg")%>" />
I get an error on every line similar to the above telling me that the path above does not exist - which at design time it does not, but during the build process all of these views are XCOPY'd to a location which contains all of the resources, such as the images, so at the point of running the application all of this path resolution is correct. Because of working in a team of people, some of which are new to ReSharper, I wanted to exclude this error from appearing as it may cause colleagues of mine to start fiddling with something that isn't broken.
ReSharper obviously doesn't know that this isn't an issue and it has no way of knowing which is why I want to turn off this specific bit of analysis. I've found on the whole that ReSharper is massively customizable and in version 6.1 under Inspection Severity there are some new MVC options, which have proved useful - but I can see no way of turning off the inspection for this.
Anybody have any ideas?

There are few options, press ALT+ENTER.
Suppress inspection "Path Error" with comment. You can suppress whole block of code, not only each of tag.
Suppress inspection "Path Error" at all at whole project.
There is new feature of 6.1 - path mapping, but it seems broken in conjunction with MVC.

Set to ignore that specific error by:
Open Soultion Errors Window by ReSharper->Windows->Soultion Errors Window.
Right-click annoying error and select Ignore Error.
See answer for another error for more explanation.

Well - It seems that this particular type of inspection is not currently catered for. I'll see if I can request it with JetBrains and hopefully more granular MVC inspection will be included in the future.
Cheers guys

Related

How do I turn off "Contains emphasized items" in Visual Studio code?

I need to figure out how to turn off emphasized items in Visual Studio Code
This might sound like a strange requirement, but in my workflow vscode functions as less an IDE than a cross-platform ViM-esque frontend with lots of remote development tools built-in.
Due to this use case, I don't need or want the linting features to show up in the file browser. How might I accomplish this?
Attempts to solve the problem
I've run out of search terms here and cannot find an answer.
Searches including terms in this question's title yielded little
SO-specific search queries also yielded little
This seems to be somewhat related, at least as a representation of the "feature" I'm referencing: VS code containes emphasized items but no error
VSCode "preferences" do not appear to show what I'm looking for, likely an issue with me not searching for the right variable name.
In my experience with VSCode it has been wonderfully customize-able, so I'm guessing there's a setting somewhere ready to be modified to accomplish this. Any help much appreciated, thanks!
My use case was a bit different: after viewing some files in a git submodule those files became linted, and errors and warnings cluttered up my VS Code Explorer file browser window on files I had no intention of ever handling. I basically wanted a way to clear out those lint warnings, and found it here. The solution is to reload the window:
CtrlShiftP on Windows/Linux, ⌘ShiftP on Mac -- then select "Developer: Reload Window"
One by-product of reloading the window is that it clears out those unwanted warnings (at least until the next time I visit the file). It also has the effect of clearing out warnings on files that I would normally want to see, of course, but chances are I'll be visiting those files again soon, so it's fine. Not a perfect solution, but it works for me and my use-case; hopefully it can help others.
I don't know how to turn it off, but I had this on multiple folders and I fixed it by renaming the folder to a random name, then naming it back to the name it was before and the error would go away.
If you have this issuse then uninstall extention then CtrlShiftP on Windows/Linux, ⌘ShiftP on Mac -- then select "Developer: Reload Window" then type developer: relode page this issuse automatically resovle
i have this issuse then i uninstall extension then this issuse resolve.
I was able to permanently prevent this by adding the files to the .gitignore file. It seems that this happens in a cloned repository when you add new files.

How to find out which Eclipse Validator caused a warning?

The Eclipse project I just imported has a lot of warnings (and even errors) and I want to find out from which validation component they are. Short of clicking through all the warnings and errors, is there a way to get quickly from the warning to the preferences so I can change them?
Here is an example. It just says "Validation Message". How can I find the location in the preferences to disable this and make it a warning instead?
Clarification: I am looking for a general solution not this one in particular. I want to be able to configure the warning level of each issue as I work through the issues. Not by clicking through preferences until I hit the right preference.
For example for Java problems, there are Configure problem serverity Quick Fixes (Ctrl+1) for that.
Unfortunately, in your case, there are no Quick Fixes at all, as you can see from the missing light bulb. Also, the type "Validation Message" is too general to be helpful here. Here only the error message and the type/extension of the file containing the error give hints where the validator can be deactivated.
Please report this as a feature request to Eclipse if it hasn't been done yet.

NetBeans - is there any way to disable the recurring error badges?

In NetBeans 8.0.1 error badges are recursive back to the project name from a file that has errors in it. This makes most of my projects look like they have errors that need to be fixed, even if the errors are being generated from code in, for example, WordPress. Not wanting to mess with WordPress core code I'm stuck with the error. Some working template files that contain code fragments also throw errors that I'm aware of and OK with.
It looks like this.
I've looked around the web and I can't find a way of removing these badges, just a load of related bug reports to NetBeans. Is there a way of removing these error badges? (I'm OK with them being on files with "errors", but I don't want them recursive back to the project name.)
I'm aware that I can set the mime type of php files to text/plain in Tools -> Options -> Misc -> Files, but that also disables syntax highlighting. That's not the answer for me.
I've come across posts on the web that mention the -J-Dnb.php.silent.error.badge=true option, but I've not been able to get this to work. Either it doesn't work, or I'm doing something wrong.
Can you help?

XMLSpy in Eclipse

I need to test XMLSpy functionality in Eclipse. After I switch Eclipse to XMLSpy Perspective and QTP is runnig (record or run mode), it does not work. Could you help me?
Thanks.
Some more information would be helpful. "It does not work" is extremely vague. What does not work? Do you mean that QTP does not record anything at all? Do you mean that QTP records something, but it is incorrect? Does it record some of your test, but misses one particular control, such as a grid? Do you have the right QTP add-ins/plugins enabled to support automation with Eclipse?
Altova support does not seem to have any reference including "Quik Test Pro" issues.
However, check for other plugins (other than XmlSpy):
similar tools has been known to fail in interaction with TPTP for instance.
Check also your Error log view, and complete your question with error messages displayed at the time of the recording.
(source: eclipse.org)

Eclipse's WTP translation output

How can I view the intermediate translation done to JSP and JSPX pages by WTP? I'm getting weird syntax errors in my Problems tab of Eclipse in a project that has plenty of .jspx pages. They don't affect anything in the running application (Tomcat 6.0) and they appeared only over the last 2 weeks, after an update.
The reason why I'd like to view the output is that I'm using the Stripes framework at http://stripesframework.org and the errors disappear for a particular .jspx file after I remove the <stripes:errors /> line of that file. At the same time, the syntax errors only appeared after I did recent fresh install of Eclipse at work, but then an update of Eclipse at home shortly therafter. I'd like to see the output to determine whose problem this should be (WTP, Stripes, or maybe just me :).
Remember that this issue is somewhat cosmetic, as it doesn't affect anything functionally. It simply spams my Problems tab in Eclipse and shows the little red X icons in the project explorer.
Right now you'd have to add the separate automated tests download to do this, and only in the 3.1 branch, but it enables a "Show Translation" command through Ctrl+Shift+9. Beware that the translation generated isn't 100% the same as the server would create at runtime--it's not intended to be executed. Also, the most recent 3.0.3 builds contain fixes to the translator that should clear up these kinds of problems (NESTED variables + self-closing tags). 3.0.3 is due in November and should update cleanly into Ganymede SR1.
I've seen the eclipse JSP editor get really confused over almost nothing. You said the problem goes away if you remove the tag. Does it come back if you put the tag back? I know that Eclipse 3.3 sometimes had some issues with JSP files where opening them, and forcing a save would clear the file of error messages (I haven't tried 3.4 yet). Maybe that's what's happening to you. Other than that, do you have all the proper includes / xml namespaces defined in the files?
I'm having exactly same problem with JSP and <stripes:errors/> tag in Ganymede. With Europa, there were no errors. Now it displays a couple of weird syntax errors on the problems pane. But as Silvaran stated it's just cosmetic, since the project builds correctly and works. It's still annoying though.