Crystal: formatter bug

Created on 22 Apr 2018  路  1Comment  路  Source: crystal-lang/crystal

h = {
  xxx: Int32,
  y:   {a: 1,
      b: 2},
}

b line is wrong indentation

bug compiler topicformatter

Most helpful comment

IMO it should be formatted like:

h = {
  xxx: Int32,
  y:   {a: 1, b: 2},
}

or:

h = {
  xxx: Int32,
  y: {
    a: 1,
    b: 2,
  },
}

But that changes the format quite a bit...

@kostya How's your ideal final formatting of this?

>All comments

IMO it should be formatted like:

h = {
  xxx: Int32,
  y:   {a: 1, b: 2},
}

or:

h = {
  xxx: Int32,
  y: {
    a: 1,
    b: 2,
  },
}

But that changes the format quite a bit...

@kostya How's your ideal final formatting of this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RX14 picture RX14  路  3Comments

will picture will  路  3Comments

asterite picture asterite  路  3Comments

Sija picture Sija  路  3Comments

lbguilherme picture lbguilherme  路  3Comments