Skip to content

Comments in long call chains regressed in 6.2.0 #411

Open
@CvX

Description

@CvX

formatting in 6.1.1:

    keys =
      ApiKey
        .where(hidden: false)
        .includes(:user, :api_key_scopes)
        # Sort revoked keys by revoked_at and active keys by created_at
        .order("revoked_at DESC NULLS FIRST, created_at DESC")
        .offset(offset)
        .limit(limit)

formatting in 6.2.0 (includes() is split into multiple lines, the comment is now next to the ), . on its own line)

    keys =
      ApiKey
        .where(hidden: false)
        .includes(
          :user,
          :api_key_scopes,
        )# Sort revoked keys by revoked_at and active keys by created_at
        .
        order("revoked_at DESC NULLS FIRST, created_at DESC")
        .offset(offset)
        .limit(limit)

See the failing Dependabot PR: discourse/discourse#23633 (that branch now also includes updated multiline lambda formatting)

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