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

Chained method calls followed by a cascade have bad indentation #137

Closed
jakemac53 opened this issue Jan 13, 2015 · 2 comments
Closed

Chained method calls followed by a cascade have bad indentation #137

jakemac53 opened this issue Jan 13, 2015 · 2 comments
Assignees

Comments

@jakemac53
Copy link
Contributor

I would expect the cascade to be indented 2 or 4 spaces more than lib.*

  Iterable<DeclarationMirror> _sortedLibraryDeclarations(LibraryMirror lib) =>
      lib.declarations.values
          .where((d) => d is ClassMirror || d is MethodMirror)
          .toList()
    ..sort((a, b) {
      if (a.runtimeType == b.runtimeType) {
        return _declarationName(a).compareTo(_declarationName(b));
      }
      if (a is MethodMirror && b is ClassMirror) return -1;
      if (a is ClassMirror && b is MethodMirror) return 1;
      return 0;
    });
@alan-knight
Copy link

Actually looking at the example, to me it seems like it should be six.

If I indent it the same as the .toList() it makes it seem like it's being sent to the original receiver. It's being sent to the result of toList(), so it seems like it should be indented relative to that.

@jakemac53
Copy link
Contributor Author

I would be fine with that as well

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

No branches or pull requests

3 participants