Olaf Gottschalk
02/10/2025, 12:46 PM@Suppress("UNUSED_PARAMETER")
in my code and now it seems that with K2 enabled, this should now be changed to @Suppress("unused")
, even as an annotation at the argument itself, not the function. Well, I was curious to read more about this suppression in general and what defines which names for the Suppress annotation are possible. Is it the compiler used, the IntelliJ plugin used, why is is that UNUSED_PARAMTER should now be just unused. My current state came to be because of using quick fixes in IntelliJ in the past, so it was not invented by me to but UNUSED_PARAMETER there... and now, because of the project using Kotlin 1.9.25 I feel like I am stuck in the middle of two chairs...Javier
02/10/2025, 12:57 PMOlaf Gottschalk
02/10/2025, 1:00 PMOlaf Gottschalk
02/10/2025, 1:01 PMdmitriy.novozhilov
02/10/2025, 1:40 PMAbout how the new one is reported, I guess it is a FIR checker.It's vice-versa. Compiler warnings/errors named in
SNAKE_CASE
Lowercase for IDE inspections
Is there any documentation whatsoever for the suppress names?If you are looking for specific names, then for compiler diagnostics you can add the
-Xrender-internal-diagnostic-names
compiler arg or enable the intellij internal mode to make these diagnostic names to be reported in the build output/IDEdmitriy.novozhilov
02/10/2025, 1:40 PMOlaf Gottschalk
02/10/2025, 1:45 PM_
as an argument name for a function. Why is that not possible btw?dmitriy.novozhilov
02/10/2025, 1:50 PMUNUSED_
diagnostics to the IDE due to two reasons:
• not all unused entities could be detected by the compiler (e.g. unused function)
• compiler diagnostics should be reliable and as most precise as possible, but IDE inspections with false-positives are perceived better. And there are corner cases when it really hard to distinguish if something is unusable or not (e.g. some plain property access could have or not have side effects)dmitriy.novozhilov
02/10/2025, 1:51 PMOlaf Gottschalk
02/13/2025, 2:13 PMdmitriy.novozhilov
02/17/2025, 8:07 AMSNAKE_CASE
).
Don't know actual conventions and possible scenarios in the IDE. I won't be surprised that there could be 3 different naming schemes for inspections (due to the size of intellij project)Ulf
03/12/2025, 12:12 PMUNUSED_PARAMETER
. So - with K2 the compiler doesn't give a warning anymore, if I've understood correctlyy? which means we can't have a CI build fail (with -Werror)
if we have something like this, right? Is there some way to make it fail again? it was quite useful...dmitriy.novozhilov
03/12/2025, 12:13 PMUlf
03/12/2025, 12:14 PM