Is it expected that the warnings in my IDE do not ...
# intellij
m
Is it expected that the warnings in my IDE do not match the compiler warnings? Typically, unused variables are not reported by the IDE but are when compiling the code. I'm using K2 everywhere. It's not a huge deals but it feels like I should be able to align this. Or maybe not?
k
For me, the unused variable appears grey, and there is an orange mark in the right-hand gutter, and if you hover over it, it says "Unused variable". Check your inspections: Settings -> Editor -> Inspections -> Kotlin -> Redundant constructs (same for other warnings)
m
Ah yes of course, I can configure the inspections in the IDE!
Right on point, that was it 👍
I somehow managed to forget I disabled this 🤦‍♂️
Follow up question: is there a way to say "I want the inspections to be exactly the same as the compiler warnings"? Does that make any sense?
I guess inspections do "more things" than the compiler. Stuff like simplifying chained expressions, etc...
1
w
I think inspections disabled in the compiler propagate to the IDE. And for those that you have disabled locally you can check the modified ones
m
I think inspections disabled in the compiler propagate to the IDE
Wait, you can disable individual inspections in the compiler now?
w