Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Get code inspection checker name from context menu
 New Topic  Reply to Topic
 Printer Friendly
Author  Topic Next Topic  

FriendlyRabbit
Senior Member

Germany
30 Posts

Posted - Dec 02 2025 :  03:45:46 AM  Show Profile  Reply with Quote
Hi,

I love the code inspections. I try to minimize the number of issues, improving my code quality and catching bugs before they cause trouble.

However, sometimes I need to silence a warning in code, e.g. when reinterpret_cast is the only way to do something. Typing something like the following is quite tedious

// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
const auto* bytes = reinterpret_cast<const unsigned char*>(buffer);


A simple improvement would be to get the checker name adding an option in the context menu when clicking on the issue in the "VA Code Inspection Results" window. When I have the checker name in the clipboard, I can google it or add the above NOLINT line.

Even better: Right-clicking on the issue in code has the option to generate the above exception. However, this is probably not as general. What if the user prefers NOLINTBEGIN and NOLINTEND.

feline
Whole Tomato Software

United Kingdom
19281 Posts

Posted - Dec 08 2025 :  07:51:13 AM  Show Profile  Reply with Quote
Being able to copy the name of the check is a good point, and this is a good reason for needing to do so:

case=166063

To see / confirm the name of the check, if you go to the Code Inspection Results window, and right click on the column headers, you can turn on showing the Checker column, which will show the name of the check.

For the comment line, I would try setting up a few different VA Snippets, all starting with the same few characters, one per check that you often need to disable. Then turn On the setting:

https://www.wholetomato.com/en/kb/s/suggest-va-snippets-on-prefixes-of-shortcuts

then you can type the common prefix for these snippets, and then pick the specific snippet you want for this particular place. I am working on the theory that there is only a handful of checks you normally need to enter a comment like this for, so the list to pick from will be small. Also, since you are using snippets, you can make sure the comments are formatted how you want.

zen is the art of being at one with the two'ness
Go to Top of Page

FriendlyRabbit
Senior Member

Germany
30 Posts

Posted - Dec 12 2025 :  01:08:14 AM  Show Profile  Reply with Quote
Yes, I see the column with the name of the check. My common use cases are copy the name for a NOLINTNEXTLINE comment or for looking it up in the internet. Both would be more convenient if you add the context menu entry.

I like the idea with the snippets and will try that. Thank you for the suggestion.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19281 Posts

Posted - Dec 12 2025 :  07:07:53 AM  Show Profile  Reply with Quote
Looking up the check is actually a really obvious use case, now you have said it. I have added this very obvious reason to the case. You might find this page a helpful start point:

https://clang.llvm.org/extra/clang-tidy/checks/list.html

this lists all of the clang-tidy checks, so there is a lot to read through, but doing a find on the page lets you quickly locate most checks, so long as you use a fairly unique part of their name.

There is a list of the checks we use here:

https://www.wholetomato.com/en/documentation/code-inspection/list-of-code-inspections

but it hasn't been updated with the latest additions yet.

Just to warn you, for some of the checks, the official clang-tidy documentation isn't as helpful in describing things as you might like.

zen is the art of being at one with the two'ness
Go to Top of Page
   Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000