belka-ew

Results 24 issues of belka-ew

```bash $ cat dscanner.ini imports_sortedness="skip-unittest" ``` ```bash $ cat test.d import c; version (Windows) { import e; } else { import d; } ``` ```bash $ ~/.dub/packages/dscanner-0.5.9/dscanner/bin/dscanner --styleCheck test.d test.d(9:12)[warn]:...

bug

It is for bug introducted by me, where the `else` get incorrect indentation if `if` has an `[]` in the condition. For example: ```d if (true) { if (args[0]) {...

```diff @@ -1,5 +1,4 @@ -void d() -/** +void d() /** */ { } ``` `--keep_line_breaks` is affected as well. It is a viable formatting for single line comments, but...

> ./dfmt --keep_line_breaks=true test.d | diff -u100rN test.d - ```diff class C { void f( { if (true) { if (true) { if (true) { return f(abcdefghijklmnopqrs.uv, abcdefghijklmnopqrs.uvwxyz, abcdefghijklmnopqrs.uv, abcdefghijklmnopqrs.uvwxyzwx,...

bug

```diff func("first argument 123456789012345678901234567890", Class(format!"%s')"( - path))); + path))); ``` This only happens with `--keep_line_breaks`, although dfmt indents the inner arguments with 4 spaces and not with 8 as the...

```diff void main() { switch (__LINE__) { case 1: doSomething; break; - // comment + // comment case 2: doSomething; break; } } ``` - `// commnet` could refer to...

Fixes #503. I looked at the code and dfmt makes best effort to recognize what is a UFCS chain. I'm not sure what is the correct behaviour. But --keep_line_breaks adding...

```diff void main() { a = new C( - 20, [ + 20, [ 'a', 'b', - ]); + ]); } ```

```diff string main() { - return duration.total!"seconds".to!string; + return duration.total!"seconds" + .to!string; } ``` It doesn't seem to happen if the chain has only one `!`. I hope it isn't...

> .\bin\dfmt.exe --keep_line_breaks=true --soft_max_line_length=120 .\test.d ```diff unittest { const expectedChains = [ MyChainLinkBuilder("a").link("b").link.value, - MyChainLinkBuilder("c").link("абвгд").link("еёжз").value, + MyChainLinkBuilder("c").link("абвгд") + .link("еёжз").value, ]; } ``` Not sure, what's going on here; the bug...

bug
indentation
wrapping
feature:keep_line_breaks