Merge: Prettier pretty printing
authorJean Privat <jean@pryen.org>
Tue, 5 May 2015 01:10:25 +0000 (21:10 -0400)
committerJean Privat <jean@pryen.org>
Tue, 5 May 2015 01:10:25 +0000 (21:10 -0400)
commit6df56eb060c4111b43982f56a7751ad8b2c13881
treec02bae963e0adc4bacddf8bab9154bf259031a00
parent066fc500cdfb2ad7e15bffb5d22600f7379bd806
parentad281e86105911fc0beaeecd411729a09cf6a99a
Merge: Prettier pretty printing

Some bugfixes, improvements and workaround for nitprettty.

The two options `--no-inline` and `--line-width` allow to control some rules about line-breaks.
This can be useful especially for people that want more relaxed rules.

~~~sh
$ ./nitpretty --check ../lib | wc -l
224
$ ./nitpretty --check ../lib --line-width 0 --no-inline | wc -l
188
~~~

So 36 more files are identical to their pretty printing with those relaxed rules.

For information, the tool crashed on some files in lib with the version before the PR.

Note that a lot of more work is still needed, one can see very strange and inconsistent results if the line width is forced to 1.

Pull-Request: #1296
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
src/pretty.nit