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
 Technical Support
 Included header is not used directly
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sosedada
Senior Member

USA
37 Posts

Posted - Dec 18 2025 :  10:28:49 AM  Show Profile  Reply with Quote
I have a love/hate relationship with this inspection. I love removing unnecessary headers (I might be a little obsessed in our large 30 year old codebase), but the false positives are so frustrating!

The most common cause is templates. So many complaints about <vector>, <boost/shared_ptr.hpp>, or one of our common `class Foo: XMLPersistent<Foo>` patterns claiming the XMLPersistent header is unnecessary.

I figured this was already on a todo list, but then remembered what they say about assuming. I look forward to being able to move this to my Level 1 category that I just automatically do whenever I see one appear (which would be another feature request for me).

LMK if you need more specific details.

feline
Whole Tomato Software

United Kingdom
19289 Posts

Posted - Dec 18 2025 :  11:55:40 AM  Show Profile  Reply with Quote
Do you have a simple code sample that shows a false positive? That would be helpful.

We are using clang-tidy for Code Inspection, and sometimes the "bad" behaviour is coming from clang-tidy its self. Other times there is a bug in our implementation. So these things need to be considered on a case by case basis.

I am not seeing an open bug report for this, which looks to be the check "misc-include-cleaner". I know people have mentioned it, but without an actual reproducible bug to study, I am not going to rush to put in a bug report for this.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic 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