https://kotlinlang.org logo
Title
c

Czar

04/27/2018, 10:08 AM
By doing that you're making those people loose time tracking why there is no output. Just add stylecheck/linting and prevent them from compiling/building code with print/println in it. This is what we have set up in our project, checkstyle detects and complains about print/println and IntelliJ highlights them also.
1
j

janvladimirmostert

04/27/2018, 10:09 AM
where do you setup checkstyle, didn't know Kotlin had that yet
I agree, that would be the better solution
c

Czar

04/27/2018, 10:10 AM
let me dig this up...
g

gildor

04/27/2018, 10:10 AM
actually maybe make sense to trry new Android Lint, it works now with pure java projects (not Android) and you can write such check
j

janvladimirmostert

04/27/2018, 10:11 AM
this is not Android though, it's for a server application
g

gildor

04/27/2018, 10:18 AM
Yes, I understand, but Android Lint 3.2 possible to use just for Java application, it supports Java and Kotlin at the same time using UAST and have API for extensions
also good reports
so for Kotlin apps sounds like a good solution
Check this talk

https://www.youtube.com/watch?v=p8yX5-lPS6o

j

janvladimirmostert

04/27/2018, 10:33 AM
this looks nice
will need to switch to gradle as well, currently on maven
c

Czar

04/27/2018, 11:26 AM
Uh, oh, seems we don't have this set up for kotlin, but I've found that at least two projects exist for Kotlin: detekt and ktlint. I guess I will be setting this up over the weekend for our project 🙂
j

janvladimirmostert

04/27/2018, 11:43 AM
ktlint has maven support, yay busy adding it now, let's see if I can throw warnings for prints, already squashing print's output
g

gildor

04/27/2018, 11:46 AM
Not sure that ktlint and detekt has this. Also if you write some check for these libraries it will work only for Kotlin. Lint provides. API that allows to write universal checks
j

janvladimirmostert

04/27/2018, 11:47 AM
we only have Kotlin, about 400k lines and 2 Java classes that we didn't feel like porting
this ktlin is amazing, it fixes stuff for you
# make sure tabs are used for indents and not spaces
[*.{kt,dart}]
indent_style=tab
tab_size=4
all of a sudden, all files that has mixed tabs and spaces are indented with tabs!