3 ms·
I'm not sure what's your question. If I review that piece of code, I think there's probably a bug. The same one IntelliJ noticed. If it's not a bug, it deserves
by euyyn 11y ago
I'm not sure what's your question. If I review that piece of code, I think there's probably a bug. The same one IntelliJ noticed. If it's not a bug, it deserves at least a comment on top. But if to know it's not a bug I need to have "a thorough understanding of the rest of the program", then the function where it is is probably unreadable. In which case IntelliJ's warning is making your code better.
- lopatin 11y agoUh ok let's say "a thorough understanding of the rest of the function" instead. Does my question make more sense? The reviewer (human or computer) needs to follow the logic of the function, understand the true purpose of the function, in order to know that the line which looks like a bug actually isn't one. I feel that most of my bugs are domain specific logic bugs. My original comment wasn't so much of a question but skepticism that such an algorithm can catch the hardest bugs, despite the improved metrics compared to other algorithms.