We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Kotlin Coding Conventions:
Prefer using an expression body for functions with the body consisting of a single expression. fun foo(): Int { // bad return 1 } fun foo() = 1 // good
Prefer using an expression body for functions with the body consisting of a single expression.
fun foo(): Int { // bad return 1 } fun foo() = 1 // good
Android Kotlin styleguide:
When a function contains only a single expression it can be represented as an [expression function] override fun toString(): String { return "Hey" } override fun toString(): String = "Hey"
When a function contains only a single expression it can be represented as an [expression function]
override fun toString(): String { return "Hey" } override fun toString(): String = "Hey"
The text was updated successfully, but these errors were encountered:
Add experimental rule function-expression-body
function-expression-body
b3fea92
This rule rewrites function bodies only contain a `return` or `throw` expression to an expression body. Closes #2150
Add function expression body rule (#2151)
9c9ca21
This rule rewrites function bodies only containining a `return` or `throw` expression to an expression body. Closes #2150
paul-dingemans
Successfully merging a pull request may close this issue.
Kotlin Coding Conventions:
Android Kotlin styleguide:
The text was updated successfully, but these errors were encountered: