-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
leftCurly: both with anonymous types #301
Comments
…xeCheckstyle#299 fixed anon types and leftCurly=both, fixes HaxeCheckstyle#301 fixed same line handling of expressionIf, fixes HaxeCheckstyle#304 fixed indentation of object literals, fixes HaxeCheckstyle#305 fixed same line handling of cases with object patterns, fixes HaxeCheckstyle#306 fixed empty line after class metadata with function, fixes HaxeCheckstyle#307 fixed missing space between Comman and POpen, fixes HaxeCheckstyle#308 refactored to increase null safety
#309) * added wrapping location to allow wrapping before delimiter, fixes #299 * fixed anon types and leftCurly=both, fixes #301 * fixed same line handling of expressionIf, fixes #304 * fixed indentation of object literals, fixes #305 * fixed same line handling of cases with object patterns, fixes #306 * fixed empty line after class metadata with function, fixes #307 * fixed missing space between Comman and POpen, fixes #308 * refactored to increase null safety
With formatter 1.5.1, the output looks like this now:
|
I've created a testcase for #301 (https://github.com/HaxeCheckstyle/haxe-formatter/blob/master/test/testcases/lineends/issue_301_typedef_anon_type.hxtest), so technically it should work - since TravisCI is green. Can you narrow your configuration down to help figure out why it fails for you? |
results in
P.S. At my workplace we have a weird style where left curly is usually on a new line, but in case of literal objects or anonymous types it's on the same line. There's no setting to achieve that, right? |
thanks, that indeed misbehaves... no, there is currently no setting allowing different curly options for object literals or anon types, see #346 |
Thanks for the link, I left a comment there as it didn't include my anonymous type case |
added CLI option --stdin to switch to stdin/stdout mode, fixes HaxeCheckstyle#411
Describe the bug
With
lineEnds.leftCurly
option set toboth
, the anonymous object type declarations have an unwanted newline added before (but not after) the{
.Input file
Broken output
The text was updated successfully, but these errors were encountered: