Skip to content

SA1208 - Missing file-scoped namespace support #3437

@ghost

Description

SA1208 SystemUsingDirectivesMustBePlacedBeforeOtherUsingDirectives is not fired when a file-scoped namespace is used.

Example:

namespace WebApi.Controllers;

using Microsoft.AspNetCore.Mvc;
using System;

[Route("[controller]")]
public class WeatherForecastController : ControllerBase
{
}

Environment:

  • .NET 6
  • C# 10
  • StyleCop 1.2.0-beta.376

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions