https://kotlinlang.org logo
#feed
Title
# feed
a

akuleshov7

10/11/2020, 8:52 AM
Hey guys, we have created a linter (checker + autofixer) for Kotlin with a huge number of rules. Will be great if you will support it at least with a very simple thing: star on a GitHub: https://github.com/cqfn/diKTat But if you will have a chance try it in your CI/CD :)
1
j

jmfayard

10/11/2020, 10:05 AM
Starred! I have looked at the Gradle section and I think that you should write an actual Gradle plugin instead of just a dependency. https://github.com/cqfn/diKTat#run-with-gradle-plugin I have myself experience with it, so if you want some help just ask https://github.com/jmfayard/refreshVersions
👍 1
a

akuleshov7

10/11/2020, 11:20 AM
Yes, we have already written maven plug-in! Cradle plugin is the next one.
👍 1
r

robertoestivill

10/12/2020, 7:11 AM
What’s the difference with detekt or ktlint?
a

akuleshov7

10/12/2020, 8:23 AM
Diktat - is a a formal codestyle and a custom ruleset with a much more detection rules than ktlint has in it’s ruleset. We have ~100 configurable rules and a formal codestyle for detecting issues. We have more rules than ktlint, they are much more complex and we have a formal style guide that describes all rules that we are checking and fixing. Also we have a great configuration mechanism that allow you to change and customize your ruleset. ktlint is not configurable. You cannot customize it in the way diktat can. You cannot customize rules that you are using. And detekt itself is used for different purposes - it is a functional bugs detection system. For code style it uses ktlint, so see the first point :) Diktat itself - is a static analyzer that uses ktlint for codestyle and codesmell issues under the hood. The idea is simple: you have different tools. One is - a static analyzer that does some searching for bugs (but actually bugs are pretty simple). It is detekt. The second approach - is ktlint - a checker and autofixer. It handles all your problems related to codestyle. And if you are lazy - it can fix them for you automatically :) Diktat - is a plugin for ktlint. A huge number of rules that can check and fix codestyle issues.
r

robertoestivill

10/12/2020, 9:51 AM
Thanks for taking your time to explain the differences. I’m curious about going with a new libray/plugins/etc on top of ktlint, as opposed to just contribute (or package) the new custom ktlint rules in an artifact that you can just depend on
a

akuleshov7

10/12/2020, 9:51 AM
@robertoestivill yeah, I am contributing to ktlint also
👍 2
But the problem is that our rules in some cases too aggressive and should go in a separate module
Also diktat - is a formal codestyle for Kotlin, not only a simple set of rules https://github.com/cqfn/diKTat/blob/master/info/diktat-kotlin-coding-style-guide-en.md
a

Austin

10/12/2020, 5:38 PM
Every time I read this package name..I read it as a NSFW name…
😆 1
a

akuleshov7

10/12/2020, 5:38 PM
@Austin that was not our choice :))
4 Views