aliens

Author Topic: Question - how to cleant #includes  (Read 2864 times)

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Question - how to cleant #includes
« on: July 15, 2022, 08:34:22 pm »
Is there any free tool to check if there are unused includes in some classes in my project? I can only find ReShaper C++ https://www.jetbrains.com/resharper-cpp/ that is not free to use. I don't want to pay $150 for it every year =)

Offline winterheart

  • Colonel
  • ****
  • Posts: 180
  • Fellow Squaddie
    • View Profile
Re: Question - how to cleant #includes
« Reply #1 on: July 21, 2022, 11:20:29 am »
Well, that depends on what IDE / OS you have. I'm personally using CLion from JetBrains, which obviously requires a subscription.

For free/opensource solution, you can try cppclean (https://github.com/myint/cppclean) or include-what-you-use (https://github.com/include-what-you-use/include-what-you-use). Eclipse CDT also has this feature.