Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RZ2012: False positive for different Blazor binding syntaxes #10553

Open
igotinfected opened this issue Jun 27, 2024 · 0 comments
Open

RZ2012: False positive for different Blazor binding syntaxes #10553

igotinfected opened this issue Jun 27, 2024 · 0 comments
Labels
area-compiler Umbrella for all compiler issues untriaged

Comments

@igotinfected
Copy link

igotinfected commented Jun 27, 2024

Ran into two false positives for RZ2012.

Case @bind-Value

Component.razor

[Parameter, EditorRequired]
public bool Value { get; set; }

[Parameter, EditorRequired]
public EventCallback<bool> ValueChanged { get; set; }

Page.razor

<Component @bind-Value="@_value" />

This will trigger the RZ2012 error for ValueChanged.

Case @bind-Value:get & @bind-Value:set

Component.razor

[Parameter, EditorRequired]
public bool Value { get; set; }

[Parameter, EditorRequired]
public EventCallback<bool> ValueChanged { get; set; }

Page.razor

<Component @bind-Value:get="@_value"
           @bind-Value:set="@SetAsync" />

This will trigger the RZ2012 error for both Value and ValueChanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-compiler Umbrella for all compiler issues untriaged
Projects
None yet
Development

No branches or pull requests

2 participants