Skip to content
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

Split method chain on function contained in nested function call #367

Closed
munificent opened this issue Jun 22, 2015 · 1 comment
Closed

Comments

@munificent
Copy link
Member

Before:

      identifier__ = identifier_____.identifier___
          .transform(new StreamTransformer<TypeArg____, Type_>.fromHandlers(
              handleData: (TypeName___ arg__, EventSink<Type_> arg_) {
        ;
      })).asBroadcastStream();

After:

      identifier__ = identifier_____.identifier___
          .transform(new StreamTransformer<TypeArg____, Type_>.fromHandlers(
              handleData: (TypeName___ arg__, EventSink<Type_> arg_) {
        ;
      }))
          .asBroadcastStream();

The problem here is that the function argument is nested inside new StreamTransformer.fromHandlers() so it isn't recognized as a block argument. Maybe for method chain splitting we should detect any hard newline within an argument list?

@munificent
Copy link
Member Author

Also, before:

    _trigger.then(ut.expectAsync((result) {
      if (_deferExpectations == null || _deferExpectations == false) {
        body(result);
      } else {
        defer(ut.expectAsync(() => body(result)));
      }
    })).catchError(ut.fail);

after:

    _trigger
        .then(ut.expectAsync((result) {
      if (_deferExpectations == null || _deferExpectations == false) {
        body(result);
      } else {
        defer(ut.expectAsync(() => body(result)));
      }
    }))
        .catchError(ut.fail);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant