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

Add new experimental rule 'function-return-type-wrapping' #1331

Conversation

paul-dingemans
Copy link
Collaborator

@paul-dingemans paul-dingemans commented Dec 30, 2021

Description

In case of a multiline function signature (e.g. the signature already contains a newline) or in case of a single line function signature which exceeds the max-line-length, force the return type to be on the same line as the closing parenthesis. This can either be wrapping the closing parenthesis plus return type to a new line, or joining the line containing the closing parenthesis with the return type. See unit tests for examples.

This rule partly overlaps with the parameter-list-wrapping but does not conflict with it.

Closes #941, #188

Checklist

  • tests are added
  • CHANGELOG.md is updated

@paul-dingemans
Copy link
Collaborator Author

This rule will be integrated into the new rule to rewrite the entire function signature. See #1341

@paul-dingemans paul-dingemans deleted the 941-function-return-type-wrapping branch July 7, 2022 18:29
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

Successfully merging this pull request may close these issues.

[Android] Return type allowed on separate line
1 participant