Skip to content

Allow single line blocks for imports and enums #3

@Hubro

Description

@Hubro

There are some situations where blocks are (almost) always very short and would be more readable on a single line. For example:

import ietf-inet-types { prefix inet; }
import ietf-routing-types { prefix routing; }

enum "foo" { value 10; }
enum "bar" { value 20; }
enum "baz" { value 30; }

There should be an option (for example -s/--single-line-blocks) that allows certain blocks (just import and enum to begin with) to be drawn on a single line, assuming they only have 1 child statement.

In these cases, post_comments should be rendered behind the entire block rather than right after the opening curly brace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions