ReSharper Custom Pattern to Ignore Path Not Found Warning - resharper

How can I configure ReSharper to ignore the following Path Not Found Error?
<img src="icon.ashx?name=navLeft&size=24" alt="">
The warning is "Path icon.ashx not found". The format for the path is "icon.ashx?name={0}&size={1}".
Can I add a custom pattern in ReSharper options to hide this warning for the entire application? if so, what would the Search Pattern look like?

According to JetBrains Support:
There's no such option to ignore any inspection results using Custom Pattern.
I'd suggest to use pattern to find such matches and then disable them manually.
Try creating the following pattern:
where $test$ is attribute value placeholder that should match to the following regex: (icon).(ashx)\?(name)=\w*&(size)=\d* and $attributes$ is any number of attributes.
Thank you.

Related

Is there a "switch" tag available

I just tried to use the switch tag on a twig template, on a Symfony 5 project and got an error.
Then looked for a solution on the web, found documentation, double checked my syntax, that was correct.
Finally, searched the twig vendor folders and didnt' found any switch*.php file.
I guess this is not available by default but can't believe it. Does anyone have an idea?
No, swicth not exists in default Twig installation.
To use the switch statement you must implement it by yourself or use a bundle/package like buzzingpixel/twig-switch.

Can custom JavaDoc tags be required?

In Android Studio it is possible to run the inspection "Declaration has JavaDoc problems" and select some "Required Tags".
It allows also to add additional JavaDoc tags, but is there a way to make them required?
Thank you very much for any help!
Example:
If "verifiedBy" tag is added, it seems that there is no way to set it as required.

Resharper naming convention exception for specific word

Our customer has a terminology called A2b, not A2B, exactly A2b.
We want to have the same name in our source code.
However, Resharper always gives warnings and proposes to use A2B.
For example: We would like to have LoadA2bData, CheckA2bAvailability instead of LoadA2BData, CheckA2BAvailability.
Is there any workaround for this?
I saw this question Resharper Naming Exception for "iPhone". But it cannot be applied for our case because A2i is not only used as prefix or postfix, but also in the middle of the names.
You can change the regex off resharper 7 this means that you can enter a custom inspection regex. You can make a new naming style for your current project.

Finding all unassociated labels in the ASP.NET project

I'm undertaking a Section 508 upgrade/conversion/whatever, and one thing that would speed me up a lot is an easy TODO list. A large offender is that we have <asp:label> tags without the AssociatedControlID="" attribute set. How can I easily find all of these tags in my solution?
I'm using Visual Studio 2012 with ReSharper (can a custom pattern help?).
Yes, a custom pattern should be able to find those for you. Use ReSharper → Find → Search with Pattern, and set up the pattern something like:
<asp:label $attributes$ />
where the $attributes$ placeholder is an "attribute placeholder", with the option "Name should NOT match the regex" set to something like \bAssociatedControlID\b.

Permalinks in conflict

I am trying to add Bodypart and Autoroutpart to my widget. When I tried to add this widget in a zone, I get following exception. Permalinks in conflict. "" is already set for a previously created PushWidget so now it has the slug "-2". Can somebody explain me what have I done wrong. Any help on this greatly appreciated.
If you are going to use Autoroute on anything, you need to configure the pattern used to generate the new URL, by going to the content type editor and deploying the settings for Autoroute. The pattern that you have in there currently is probably empty or has tokens that evaluate to an empty string. Change it to a pattern that is meaningful for this context.

Resources