Disabling some inspection warningg for Blazor components

I have a Blazor 8 App project. The server part of the app contains file: `Components/App.razor` with these lines:

```
<!DOCTYPE html>
    <head>
        ...
        <HeadOutlet/>
    </head>
    <body>
        ...
        <script src="_content/MyLib/MyLibFunctions.js"></script>
    </body>
</html>
```

Rider highlights the `head` tag with problem "Missing title". Because the page title is provided in `<HeadOutlet/>` tag, I'd like to mute this inspection warning. How to do it and why in the context actions for this line there is no inspection option to mute it?

Secondly, in the `<script src="_content/MyLib/MyLibFunctions.js"></script>` line the `MyLib/MyLibFunctions.js` string is highlighted with warning that path is not found. Because of the way Blazor handles component libraries, I'd like to mute this warning. If I pick the option to disable once with comment from the context actions I get this:
```
@* ReSharper disable once Html.PathError *@
<script src="_content/MyLib/MyLibFunctions.js"></script>
```
However, the string `MyLibFunctions.js` still remains highlighted. The comment muted only part of the warning. Adding a second comment like this makes no change. How to remove the whole warning for this particular line?

0
1 comment

The following steps are verified in the latest 2024.3 release.

The inspection is from HTML rules, you can configure the profile in context actions as below.

You can set the HTML path error severity to “Do not show”. 

I also realized this inspection rule could not be muted by inline comment. I create a new YouTrack ticket for this problem:

RIDER-120253 "Inspection: Path Error" for HTML in Blazor cannot be ignored by inline comment

0

Please sign in to leave a comment.