Find origin of language warnings and errors in VSCode - visual-studio-code

Visual Studio Code will sometimes give you warnings or errors for your code, usually indicated by:
as "Problems" in the respective pane (the "Focus on Problems View")
yellow or red squiggly lines under the offending code
in tooltips when hovering the offending code
inline when you click "View Problem" or use ALT+F8
None of these UI features seem to tell me: how to find the origin of such warnings and errors? Which extension or rule or linter or built-in feature is responsible for that specific problem?
Often the warnings and errors make sense, or you can deduce what must be the originator. But sometimes this is not so obvious, and to find the right documentation for said error (to get more information on the reason, rationale, potential fixes, etc.) I'd need to know what caused the warning or error.
For example the "Unkown rule" error from my screenshot presumably comes from stylelint since they have a specific rule around that. I want to know how I can find this out from within VSCode?
My current workarounds include "fiddling around until the error disappears", and "Googling error messages to inevitably find a Stack Overflow post that explains things", but I want to understand what's going on, and what the root of the errors is.

Related

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.

How to fix 'LOD code supposed to be unreachable' error

I'm working on a project in Unity and while in the middle of placing trees, the following errors pop up in the console log:
LOD code supposed to be unreachable.
The text underneath says:
UnityEditor.DockArea:OnGUI()
The second error is the same except the subtext says:
UnityEngine.Camera.Render()
I am at a loss as to what this means or what caused it. I looked online and only found 2 obscure inconclusive threads asking similar questions.
The first error message
LOD code supposed to be unreachable.
has been reported already and is occuring on Unity 5.3.4f1 for my part. However, they already fixed the tracked issue, but according to the ticket it will be in a future version of Unity 5.3.6.
I have read the recent patches and it is not included in any of them yet. I guess we'll just have to wait.
Concerning the two following errors, I've seen them as well, but it seems unrelated to the LOD error.
In each case though, it doesn't prevent me from running the game scene, it is just a bit annoying in the console.
UnityEditor.DockArea:OnGUI()
UnityEngine.Camera.Render()

Intellij IDEA, scala, show all errors

I cannot get any useful error reporting in IDEA 14. Errors are nicely underlined but it would be nice if I could somewhere see a collection of all the errors I have in my code.
Problems monitor is not showing anything, scala facet wont load, I', lost.
I would be satisfied with a window that would just collect all the errors I have underlined in my code, or a functionality similar to F2 shortcut (go to next problem) if it would work across whole solution, not only within a file.

Exclude ReSharper error for "Resource not found" inside Views

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

How do i stop XCode from having build errors repeatedly appear and disappear?

Very often, when I run my unit tests for my iPhone project, XCode feels like making the actual errors disappear from the errors and warnings group. These errors are often under the general sub-item of that group, and often when I need to read the text of the error in detail, all errors disappear and all I have left are the build warnings. Has anyone else seen this behavior and is there a way to fix it?
Edit: I forgot to mention; this seems to happen when i have errors that are not tied to any file (it says Line Location:0 in the second column of the error list). If there aren't any errors there (when generally the only errors are failed assertions) then it seems to work ok.
I haven't seen this behavior but what you describe sounds like a bug to me. You should submit it to apple.
It's hard to follow what you're talking about. What I can deduce is that you:
Build a Unit Test target
See the Errors and Warnings in an item in the Build Results window
Do something you don't explain to "read the text of the error in detail"
See the errors disappear (from the build results window?) but the warnings remain
It would help to see a screen shot of your project when it's doing what you want, before the errors disappear, and to learn what you are doing right before they go away.
This is probably happening because you have multiple targets with dependencies.
One target is dependent on another (usually unit tests) and the unit tests get built and their warnings/errors show up. Then, the main target gets built and its warning/errors show up. Since they are different targets, they second batch shows up over the first batch.
Assuming this is the problem, you can see the first batch by manually changing your target temporarily.