Skip to content

Disable the RXUISG0016 analyzer for read-only properties #66

@PremekTill

Description

@PremekTill

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

When including ReactiveUI.SourceGenerators in a project, the RXUISG0016 analyser marks public properties on ReactiveObjects and offers to convert them to Reactive fields. However, this change does not make much sense for read-only properties - since they can never change, there is no need to wire them up for INPC. Additionally, the quick fix converts them to standard read-write fields, removing the original behaviour (and they cannot be made readonly due to the attribute requirements).

Describe the solution you'd like

Removing the false positives by only triggering RXUISG0016 for read-write properties.

Describe alternatives you've considered

Disabling the analyser globally via editorconfig - this obviously removes the issue of false positives, but loses the convenience of using the quick fixes when appropriate. Also, the analyser is only at "hint" level by default, so it can be simply ignored when not desirable - but the false positives still create unnecessary IDE noise if nothing more.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions