Skip to content

Feature Request: Improved Formatting for Long Tuple Definitions #84

Open
@exai-sukh

Description

@exai-sukh

Current Behavior

When defining tuples with multiple elements, the current formatter outputs all elements on a single line. This can be difficult to read, especially when there are many elements, making the code less readable.

Current Formatting Example:

  input:
  tuple val(the), val(nextflow), val(formatter), val(is), val(great), val(because), val(it), val(ensures), val(consistent), val(and), val(clean), val(syntax)

Proposed Improvement

Introduce formatting rules that break tuple definitions into multiple lines when the total length or the number of elements exceeds a threshold. Ideally, this threshold is configurable.

Proposed Formatting Example:

  input:
  tuple val(the),
    val(nextflow),
    val(formatter),
    val(is),
    val(great),
    val(because),
    val(it),
    val(ensures),
    val(consistent),
    val(and),
    val(clean),
    val(syntax)

Metadata

Metadata

Assignees

No one assigned

    Labels

    formattingRelated to automatic code formatting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions