dotnet / dotnet/roslyn

Allow BL0005 warning suppression

Open
#85,533 0 comments 0 reactions 1 assignee Claimed by @chsienki View on GitHub
Area-Razor Area-Razor-Compiler Feature Request
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

OK, I think everybody knows about the `BL0005` warning which tells you that you _should not set component parameter outside its component_. I think it is a good practice **BUT**, for eg, you have _multiple components that having a datalist with different columns_ and you want to have a config model that defines the columns instead of redefine that data list in every component.

So, not a big request, but can we have the option to suppress the warning please. Right now we don't have any option to suppress it when right click the warning.

I think that if someone is doing just like me, will want to disable that warning and we absolutely know what we are doing.

### Describe the solution you'd like

Have the option to suppress the warning.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.