Skip to content

Fix S4507 FP: Alerting on !app.Environment.IsProduction() #9829

Description

@kyleherzog

Description

When specifically checking that we are not in the production environment S4507 "Disable this debug feature in production" is raised.

Reproducer

if (!app.Environment.IsProduction())
{
    app.UseDeveloperExceptionPage();
}

Product and Version

SonarAnalyzer.CSharp v10.32.0.713

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