Skip to content

Feature request: option for newline-separated groups #97

@drubery

Description

@drubery

I'm using keep-sorted in Chromium to sort some experimental flags by name. This is a little challenging as the flag definitions can span multiple lines (#if for per-platform behavior, parameters associated with a flag, etc.). Right now we're using group_prefixes to apply to everything except empty lines, but it would be nice to have a simpler solution there.

Something simple like group_by_newlines=yes which would take precedence over other grouping rules, accumulating groups until an empty line is encountered, would easily solve this for us.

(Happy to send a PR for this if it would be considered useful)

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