Skip to content

NET-1823 Improve S4057: First perform a syntax check before calling semantic model for object creations #5924

Closed
@mary-georgiou-sonarsource

Description

S4057 is processing all the object creations in a source file.

For each object creation, the rule is querying the semantic model.

Based on the fact that the rule is interested only in two particular types, System.Data.DataTable and System.Data.DataSet, it would be better to first filter the object creation on a syntax level. Then if they belong to one of those types, the semantic model can be called.

This change will increase the performance of the rule.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions