Open MarinaShaposhnikova opened 5 years ago
there is no your library here https://plugins.gradle.org/search?term=ktlint
Please follow Usage
part from readme: https://github.com/MyDogTom/ktlint-custom-rules#usage
If it still not works, please post your setup from build.gradle and your exact error.
I suggest:
Nothing new, I just copied and pasted 'Complete (KtLint + custom rules) Gradle configuration'
My error is
`Could not find com.github.MyDogTom:ktlint-custom-rules:v0.1.0-RC1. Searched in the following locations:
Now I see, README
has an error. Sorry. Library is not published. You have to use JitPack.
For that, add maven { url "https://jitpack.io" }
to your repositories
block.
Thanks, it works.
But anyway incorrect way, have it in console without fix
`> Task :ktlintFormat : Unexpected indentation (-3) (it should be 4) : Unexpected indentation (-3) (it should be 4) : Unexpected indentation (-3) (it should be 4) : Unexpected indentation (1) (it should be 4)
and etc`
Please, provide more information what's wrong.
ktlintFormat
task should display all errors and fix them. If it's not happening, could you create simple project and share with me? Just your setup + one file that has violation and is not fixed by rule.
Hey @MarinaShaposhnikova Did you manage to apply indentation autocorrection? I'm happy to help, but I need more information.
I use file template for generate Kotlin code. when I Use 'format.sh' in Inteliji or in Android Studio everything works fine. E.g. this is my auto-generated class `
class ExampleClass() {
fun doInstances() { val class1 =
Class1 (
someObject.get(),
Class2 (
someObject.get2(),
Class3 (
someObject.get3()
)
)
)
}
} `
What I want to have
` class ExampleClass() {
fun doInstances() {
val class1 =
Class1(
someObject.get(),
Class2(
someObject.get2(),
Class3(
someObject.get3()
)
)
)
}
} `
@MyDogTom Is it still relevant? I have a lot of issues with indentation and wanna use this project, but I can't download it anywhere
error: