https://kotlinlang.org logo
#android
Title
# android
c

Colton Idle

04/20/2020, 4:41 PM
I noticed that after adding kotlin to my android project my build output is littered with this. (Both locally and CI)
Copy code
> Task :app:compilePaidDebugKotlin
w: /bitrise/src/app/src/rollertoaster/myview/HealthView.kt: (66, 46): No cast needed
w: /bitrise/src/app/src/rollertoaster/myview/HealthView.kt: (97, 44): Parameter 'dialog' is never used, could be renamed to _
w: /bitrise/src/app/src/rollertoaster/myview/HealthView.kt: (174, 40): Parameter 'dialog' is never used, could be renamed to _
w: /bitrise/src/app/src/rollertoaster/myview/HealthView.kt: (416, 21): The expression is unused
w: /bitrise/src/app/src/rollertoaster/myapp/HealthInitializer.kt: (33, 24): Parameter 'context' is never used
w: /bitrise/src/app/src/rollertoaster/myapp/MyDialog.kt: (48, 27): Condition 'response.yours == null' is always 'false'
w: /bitrise/src/app/src/rollertoaster/myapp/MyDialog.kt: (54, 13): Condition 'actions == null' is always 'false'
w: /bitrise/src/app/src/rollertoaster/myapp/MyDialog.kt: (55, 57): Parameter 'w' is never used, could be renamed to _
...
A lot of these warning a so tiny, is there an easy way to just fix all of them, or just prevent them? Not sure why they even show up honestly.
z

Zach Klippenstein (he/him) [MOD]

04/20/2020, 4:51 PM
I’m not sure about all of these, but sometimes IntelliJ gives you an option to fix all instances of a particular suggestion in the project.
c

Colton Idle

04/21/2020, 12:18 AM
It seems like these are only a subset of those. I wish I knew where they all came from. 😃 Especially since this comes from CI
2 Views