"Redundant safe navigation" RubyMine JetBrains wrongly triggered warning - rubymine

Seems like when we have &.first it wrongly mark it with warning
The solution I found for this is to either reduce the level of Severity or disable the check at all.
I personally chose to reduce the level to 'No highlighting, only fix'

Related

Find origin of language warnings and errors in VSCode

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.

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.

Eclipse CDT with MinGW displays warnings as errors

I have a little problem.
I just installed Eclipse CDT and created a C project using MinGW and all my simple warnings (like "unused variable" etc) are shown as errors.
The program build fine and I can run it, but all these errors are annoying.
I already checked the compiler settings and "Warnings as errors (-Werror)" is unchecked.
What do i do?
In my case, the problem was caused because the compiler/builder's message was in a different language than Eclipse.
Thus, Eclipse could not identify them as Warnings and thought they were Errors instead.
I solved by making an environment variable to set the compiler to the right language,
Thanks to this question
As the messages were sent on the right language, Eclipse changed the markers to warnings and compiled without any error messages.
If -Werror would be checked, the build would fail. By the way you should definitely check it so that it enforces you to take care of all the warnings right from the beginning.
You can suppress some warnings (but not all), with special options to GCC (MinGW). You can see which options are needed to suppress this or that warning in the end of the warning itself.
Nevertheless, I strongly recommend against it. It's rather better to resolve all the warnings right from the beginning. Strive to design your projects in the way that they are able to be built with -pedantic -Wall -Wextra -Werror options. There are 3 main benefits of this approach:
Your code would be nearly bulletproof;
Your code would conform to the standard closely;
Your code would be more portable across different compilers
(as some of them tend to treat some warnings as errors by default).
Remember, leaving the annoying warning flood is a bad habit, and you should definitely get rid of it right from the start.

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

Eclipse CDT: how to get rid of a specific warning?

How do I get rid of the "deprecated conversion" warning in CDT? I know how to #pragma it out of the compilation process but the highlighting in the CDT is annoying!
The warning, more probably than not, comes from the compiler. If you compiled and got the warning and later on removed it from the compilation process by means of a pragma or compiler option, it might be the case that the IDE still remembers it. It should go away in a later compilation, or you can manually delete within the Problems windows.
If you have not removed it from the compilation process (that is, the warning comes out in each new compilation) this will be mainly useless as the warning will come back. But then again, if it is still there, the IDE is just reminding you.