Skip to content

Consider adding empty lines between groups of using statements, or respect existing empty lines. #988

@belav

Description

@belav

The initial version of sorting usings (#661) did not retain existing empty lines.

If we try to retain existing empty lines then

  1. What happens when usings are moved?
  2. Can the user easily correct any misplaced empty lines?

If we add empty lines automatically

  1. Should they only appear between groups that are sorted? Or between the first part of the namespace?
// between sorted groups
using System.IO.Abstractions;
using System.Text.Json;
using System.Text.Json.Serialization;

using Microsoft.Extensions.Logging;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;

// by first part of namespace
using System.IO.Abstractions;
using System.Text.Json;
using System.Text.Json.Serialization;

using Microsoft.Extensions.Logging;

using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions