Wumpf / IncludeToolbox

Visual Studio extension to format, prune, and inspect include directives.
https://marketplace.visualstudio.com/items?itemName=Wumpf.IncludeToolbox
MIT License
51 stars 22 forks source link

Comment tag to avoid removing include in iwyu & trial and error removal #38

Closed Wumpf closed 7 years ago

Wumpf commented 7 years ago

See Q&A by Ergin Salih https://marketplace.visualstudio.com/items?itemName=Wumpf.IncludeToolbox#qna

Have you considered adding an option where you can tag an include file (in a preceding comment) so that it is not considered for removal in a specific CPP file. I had a issue where an include file was removed because the CPP file compiled but the code did not run correctly.

ergins23 commented 7 years ago

How about something like this.

#include "tokenizer.h" // $include-toolbox-ignore$ or ... #include "tokenizer.h" // $include-toolbox-preserve$

That way if you had more options then you just keep adding them to the end of the line.