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

standard_function-expression-body is not working #773

Open
Ktaewon opened this issue Sep 3, 2024 · 0 comments
Open

standard_function-expression-body is not working #773

Ktaewon opened this issue Sep 3, 2024 · 0 comments

Comments

@Ktaewon
Copy link

Ktaewon commented Sep 3, 2024

my versions : java: 17, gradle: 8.10, kotlin: 1.7, ktlint-gradle: 12.1.1, ktlint: 1.3.1

plugins {
    id("org.jlleitschuh.gradle.ktlint") version "12.1.1"
    ...
}
...
ktlint {
    version.set("1.3.1")
}
  • example code
fun a(): String {
    return "some"
}

This code should print Function body should be replaced with body expression (standard:function-expression-body) when use ktlint.
When i set ktlint_standard_function-expression-body = enabled to my .editorconfig, it doesn't work when I do ./gradlew ktlintcheck.
But it works with commend ktlint --editorconfig=./.editorconfig(with official library)

Is there any reason you can think of? For example, it might be conflicting with another setting, or a specific version is not supported yet.

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

1 participant