ruby-syntax-tree / syntax_tree

Interact with the Ruby syntax tree

Home Page:https://ruby-syntax-tree.github.io/syntax_tree/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Comments in long call chains regressed in 6.2.0

CvX opened this issue · comments

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)