Suppress unused macro warning for one line?
已回答
Hi to everyone,
I recently started to use BoostTest in Clion and the code inspection whines about the boiler plate code of the test, generating a number of warnings.
I don't want to suppress the warnings globally, but ideally at level of file or also for just one line it would be fine.
I can suppress all of the warning using the "Context Actions" menu (Alt+F2), except for one: unused Macro, which actually is just a define that includes the BoostTest main(). For that warning the "Context Action" menu only gives me the option of safe delete. The define are actually necessary, commenting them the tests would not compile.
How can suppress these warnings? Is this a bug?
Thank you, have a nice day
请先登录再写评论。
Hello!
You should be able to suppress this inspection for a file (https://www.jetbrains.com/help/clion/disabling-and-enabling-inspections.html#suppress-in-editor):
Do you have this option?
Hi, the point is that when I click on "Safe delete" this window appears instead of the other options. If I hover with the pointer nothing happens.
Seeing the blue selection occurred to me that maybe pressing the right arrow forces the other menu to pop up, and indeed it does. Don't know if it is designed this way or it's a problem. On other menus of this type I can click and the sub-menu appears, instead here it directly applies the selected action.
Anyway thanks, problem solved, have a nice day!
Luca
>Don't know if it is designed this way or it's a problem
It's designed. From the web help: "Use the up/down arrow keys to select this item and then press the right arrow key or just click the right arrow next to this item".