OyvindSabo / gremlint

Linter/Code formatter for Gremlin
https://gremlint.com
Apache License 2.0
10 stars 6 forks source link

In traversals where a middle step is not called (with parentheses), that step is not correctly indented #50

Closed OyvindSabo closed 4 years ago

OyvindSabo commented 4 years ago

I'm not sure if there is ever a case where this would occur in a traversal, but I still think it should be handled better.

Assuming a maximum line length of 45 characters, the following query

g.V().stepWhichIsNotAMethod.stepWhichIsAMethod()

is currently formatted as

g.V().
stepWhichIsNotAMethod.stepWhichIsAMethod()

when it should rather be

g.V().
  stepWhichIsNotAMethod.stepWhichIsAMethod()