Skip to content

Comments in long call chains regressed in 6.2.0 #411

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions