xxfast
11/02/2023, 5:31 AMxxfast
11/02/2023, 5:32 AMJakub Gwóźdź
11/02/2023, 6:53 AM./gradlew detekt --auto-correct
does the reformat to eliminate problems whenever possible
• IDEA formatting also can be configured to format code so detekt is happy
• You can tweak config a little so if you have a team member who will protest against some minor quirks in code style, you can compromise and adapt so everyone is happy
• It’s rather quick to adapt to new language features, although to be fair, it’s a long time since we had it in Kotlin, isn’t it.
• ./gradlew build
on cicd will fail-fast if you push ugly code because you forget to check it locally.
Cons:
• ./gradlew build
on cicd will fail-fast if you push ugly code because you forget to check it locally.
• Isn’t too quick (gradle plugin takes time to start and process all files, but to be fair it seems to be caching things from run to run)xxfast
11/02/2023, 6:56 AMJakub Gwóźdź
11/02/2023, 7:01 AMxxfast
11/02/2023, 7:02 AMxxfast
11/02/2023, 7:03 AMJakub Gwóźdź
11/02/2023, 7:14 AMxxfast
11/02/2023, 7:25 AMJakub Gwóźdź
11/02/2023, 7:36 AMStylianos Gakis
11/02/2023, 8:02 AMone of the comments from the reddit thread above (from 9 months ago) claims ktlint is not that deterministic.
Version 1.0 which was released just recently should be much more deterministic
Stylianos Gakis
11/02/2023, 8:03 AMxxfast
11/02/2023, 8:34 PM