Skip to content

VSSDK006 fires when validation is in another method #111

@sherryyshi

Description

@sherryyshi

I would like to report telemetry when a service is null, so I'm validating my services with another method rather than calling Assumes.Present, or duplicating bunch of if-null blocks. However, VSSDK006 doesn't detect that.

FXCop's CA1602 addresses this by looking at the [ValidatedNotnull] attribute on the validation method (see dotnet/roslyn-analyzers#2863 (comment)). Any chance something similar can be done here?

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