Commit Graph

387 Commits

Author SHA1 Message Date
Hackerpilot f37f2b4622 Fix a bug in the newline logic 2020-06-11 03:07:17 -07:00
Hackerpilot 69bd684b44 Fix #490 2020-06-09 17:09:29 -07:00
Jan Jurzitza 34810aa928 Fix stuck-while TODO (this is a do-while loop) 2020-04-03 09:19:24 +02:00
Jan Jurzitza cb1dfe091f Check for token before access, fix #474 2020-04-02 13:39:29 +02:00
Jan Jurzitza 7b955c18d1 Add hasCurrent to check if a token is available 2020-04-02 13:38:02 +02:00
Eugen Wissner ef83514541 keep_line_breaks: Compare with the token end line 2020-03-24 14:39:31 +01:00
Eugen Wissner 394da5d02a Fix break after comma, before this 2020-03-22 17:54:59 +01:00
The Dlang Bot 66faac49f1
Merge pull request #470 from dlang-community/issue-469
Fix Issue #469
merged-on-behalf-of: Brian Schott <Hackerpilot@users.noreply.github.com>
2020-03-09 10:03:20 +01:00
Hackerpilot e9034f4fec Fix return value when reading from stdin 2020-03-08 13:23:42 -07:00
Eugen Wissner 5f0d2843e6 Support disabling automatic line breaks
Support disabling automatic line breaks With --keep_line_breaks.
2020-03-07 21:14:10 +01:00
Hackerpilot 4db5ba44b2 Error out on lexer failure 2020-03-06 13:09:14 -08:00
Geod24 d38c3d96bf Replace 'body' with 'do'
The former is set to be deprecated in the next (2.091.0) DMD release.
2020-02-04 11:28:21 +09:00
Geod24 da51958770 Remove trailing whitespace 2020-02-04 11:27:58 +09:00
Eugen Wissner 27929e4cc5 Wrap the argument list of a template function
Fixes #454.
2020-01-12 22:49:16 +01:00
Eugen Wissner 0795a477f1 Put space between a comment and an identifier
Fixes #452.
2020-01-05 23:11:18 +01:00
Eugen Wissner 8f779b33bf Put a space in contract expressions
Fixes #448.
2020-01-05 20:28:56 +01:00
sobaya 06881d8654 Fix: assertion message in indent manipulation of struct initializer 2019-08-04 13:05:39 +09:00
sobaya ac8e34815f Fix: Use more readable expression 2019-08-04 13:04:39 +09:00
sobaya 05db8ae8fa Fix: indentation for wrapping in struct initializer 2019-08-01 17:43:45 +09:00
sobaya 81c607a115 Fix: extrace space after first field 2019-08-01 16:58:41 +09:00
sobaya ac61efe767 Fix: Issue 256 "named member struct initialisers" 2019-07-30 13:02:48 +09:00
Kotet 3af8edc57f Fix #361 - Unexpected empty new line if function header ends with a comment 2019-05-14 09:00:56 +09:00
Kotet f8f34ff097 Fix #426 2019-05-13 17:49:12 +09:00
Kotet 2cc1f59235 Fix #433 2019-05-13 12:13:32 +09:00
Hackerpilot b4e97d3381 Fix #436 2019-02-20 11:25:31 -08:00
Laurent Tréguier b34acc9f26 Update libdparse to v0.11.2 (#429)
Update libdparse to v0.11.2
merged-on-behalf-of: Basile-z <Basile-z@users.noreply.github.com>
2019-02-12 18:53:19 +01:00
Laurent Tréguier dae7d85c80 Fix #427 - Crash on invariant (#428)
Fix #427 - Crash on invariant
merged-on-behalf-of: Basile-z <Basile-z@users.noreply.github.com>
2019-02-11 13:55:33 +01:00
WebFreak001 7f41c8ae7f fix array item access regression 2019-01-12 12:25:46 +01:00
WebFreak001 98cd73ec80 Fix 2D (assoc) arrays & add tests
Fix #312
2019-01-11 22:06:57 +01:00
WebFreak001 eebd341343 Allow multilineAt to stop at commas 2019-01-11 22:05:41 +01:00
WebFreak001 733898e013 more informative dump function 2019-01-11 22:04:52 +01:00
WebFreak001 1da1ca6545 Fix isMultilineAt for array + refactor right bracket
Refactor formatRightBracket into own function
2019-01-11 20:19:50 +01:00
WebFreak001 48b2b84c33 Add documentation/comments & undo minor name change 2019-01-11 01:11:03 +01:00
WebFreak001 fcad21ba61 Improve AA formatting
fix #143, fix Pure-D/code-d#188
2019-01-11 00:50:50 +01:00
WebFreak001 85c7d57167 make multiline checking code modular
Arrays and delegates now use the check whether a line is longer
than the max line length using easy to reuse code
2019-01-11 00:48:59 +01:00
WebFreak001 053b775cd1 Add details to indentation stack
This makes more advanced state handling easily possible.
Also moved isWrapIndent/isTempIndent into this, which allows
for exceptions for certain tokens and more control.
2019-01-11 00:47:50 +01:00
WebFreak001 6e4136a353 Make colon almost never break a line 2019-01-11 00:45:47 +01:00
WebFreak001 3b094b16d9 Add ArrayLiterals into arrayStartLocations list
This is done to properly format arrays in function arguments
2019-01-11 00:44:11 +01:00
Laurent Tréguier f4417dc1b5 Update libdparse to v0.10.x (#410)
Update libdparse to v0.10.x
merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
2018-11-10 14:02:31 +01:00
Laurent Tréguier 67664c2835
Don't put spaces inside empty braces 2018-11-06 16:40:25 +01:00
Bastiaan Veelo 92d5e1ac8c Allow comments in selective imports. (#403)
Allow comments in selective imports.
merged-on-behalf-of: Brian Schott <Hackerpilot@users.noreply.github.com>
2018-10-19 01:45:52 +02:00
Laurent Tréguier 6ad2fbb6fc Fix #287 - Extra space after import in delegate 2018-10-15 10:14:23 +02:00
Laurent Tréguier 049f86ebfd Fix #349 - Wrong indentation of access modifier after break of long line 2018-10-11 05:43:37 +02:00
Laurent Tréguier 2578dbf2a7 Fix #267 - Indentation with debug inconsistent 2018-10-11 05:43:18 +02:00
Laurent Tréguier 908f32e433 Properly recognize debug as block header 2018-10-11 05:43:18 +02:00
Laurent Tréguier b928eb6d84
Fix #345 - Case of trailing white space 2018-10-10 13:37:06 +02:00
Laurent Tréguier 6ff47e106a
Fix else indentation after debug conditions 2018-10-09 13:19:07 +02:00
Laurent Tréguier 72dd6e83b3
Stop directly accessing top indent token
Accessing the top indent token without using the topIs* () methods is
unsafe and can lead to range violations.
2018-10-09 12:04:44 +02:00
Laurent Tréguier c84db53c7c Fix #372 - Improper indentation after single-line catch (#395)
Fix #372 - Improper indentation after single-line catch
merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
2018-10-08 13:32:15 +02:00
Laurent Tréguier f3463cdd34 Fix #326 - Spaces missing after attributes in function literals (#394)
Fix #326 - Spaces missing after attributes in function literals
merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
2018-10-07 20:47:28 +02:00