Commit Graph

135 Commits

Author SHA1 Message Date
Hackerpilot e39f2916b1 More formatting fixes 2015-02-17 15:31:22 -08:00
Hackerpilot 506e150eea Merge branch 'master' of https://github.com/Hackerpilot/dfmt
Conflicts:
	src/dfmt.d
2015-02-17 12:43:42 -08:00
Hackerpilot eb2f783333 Code cleanup 2015-02-17 12:35:39 -08:00
Hackerpilot e90b84dcde Line wrapping improvements 2015-02-01 02:22:27 -08:00
Hackerpilot 41854aaeb6 Fix #12 2015-01-25 11:02:03 -08:00
Hackerpilot e4ed938515 Fix #11 2015-01-25 10:57:31 -08:00
Brian Schott 102dbe4db0 Merge pull request #10 from jcd/master
Allow for outputting to anything supporting the write() method. Make it ...
2015-01-18 08:22:22 +00:00
Jonas Drewsen c1334ab3ec Use output range instead of file for output 2015-01-18 09:04:04 +01:00
Jonas Drewsen 81b17c8f31 Allow for outputting to anything supporting the write() method. Make it possible to exclude main. 2015-01-17 21:29:28 +01:00
Andreas Zwinkau e1587e3e29 class after ; requires an additional newline 2015-01-17 16:40:14 +01:00
Andreas Zwinkau 91f804496a preserve double newline between comments 2015-01-17 16:26:27 +01:00
Andreas Zwinkau ebb11b0695 Colon always needs space around
Reverts 9284f1a which adds space around colons only in the case of
ternary expressions. However, import bindings and class inheritance
needs space as well. The overhead of the ast-list techniques seems
unnecessary.
2015-01-17 15:38:24 +01:00
Andreas Zwinkau b8ca18ab24 foo()@safe needs a space 2015-01-17 00:29:28 +01:00
Andreas Zwinkau de1f052b73 return without argument must have no space 2015-01-17 00:21:17 +01:00
Andreas Zwinkau cb9a4015e7 Import with comment behind must not output newlines 2015-01-17 00:19:51 +01:00
Andreas Zwinkau 91983ebfea More clever length estimating for import statements
Comma separated imports can get so long, they line breaks. Previously,
line breaks were inserted, if the identifier after "," made the line
longer than the soft limit. Now the whole expression length after ","
is calculated for the decision. For example, no line breaks within
"std.stdio" anymore.
2015-01-16 22:12:40 +01:00
Andreas Zwinkau 2d218f234b refactor: extract function 'tokenLength'
Seems to fix a bug where the length was incorrectly calculated,
since tests/guessnumber.d output changed to something saner.
2015-01-16 22:12:40 +01:00
Andreas Zwinkau 0f337b0a15 Put some space before @ 2015-01-16 22:12:40 +01:00
Andreas Zwinkau feb75b4d3b No trailing space after for,foreach,etc 2015-01-16 22:12:40 +01:00
Hackerpilot 9284f1afb6 Better formatting for ternary expressions 2015-01-16 11:34:38 -08:00
Andreas Zwinkau 6538abd177 No spaces-only lines after imports
Fixes tests/higherorder.d
2015-01-15 22:55:56 +01:00
Andreas Zwinkau 2278a4c16b add --help option and usage string 2015-01-15 22:34:03 +01:00
Andreas Zwinkau d59e186ed9 handle multiple arguments and directories 2015-01-15 22:34:03 +01:00
Andreas Zwinkau 1e543822fc refactor: extract function 'format' 2015-01-15 19:49:55 +01:00
Andreas Zwinkau 8983dc8b15 tuning whitespace around comments 2015-01-15 09:30:55 +01:00
Andreas Zwinkau 158c679349 no doubleNewline at end of file 2015-01-14 21:43:29 +01:00
Andreas Zwinkau 8dfce773d1 always a space after 'return' 2015-01-14 21:11:58 +01:00
Hackerpilot cf9876f565 No spaces after 'this' if followed by '.' 2015-01-13 23:47:40 -08:00
Hackerpilot 43d84337d4 Fix problem with identifiers and keywords being combined intobigidentifiers 2015-01-13 15:01:17 -08:00
Brian Schott 39fadba85c Merge pull request #1 from BBasile/master
fix, array length has to be of type size_t
2015-01-13 22:03:19 +00:00
Andreas Zwinkau 6e9448bdbb add --inplace option 2015-01-13 22:16:27 +01:00
Basile Burg 65415a15d5 fix, array length has to be of type size_t
...otherwise build fails on a 32 bit OS
2015-01-13 14:03:05 +01:00
Hackerpilot 9c8abe55fa Better enum formatting and whitespace cleanup 2015-01-13 01:47:06 -08:00
Hackerpilot b82ef4ad60 Formatting is much better now 2015-01-12 23:31:38 -08:00
Hackerpilot 5d324e81be Initial commit 2015-01-11 17:50:30 +00:00