Reports the include directives that are not used or not required and can be removed safely.
- Detect completely unused
- An include directive is considered unused if declarations from it are never used within the translation unit.
- Detect not directly used
- An include directive is considered unused if declarations from it are not used in the file directly. This works best with the "Include What You Use" policy.
- Detect not required
- Detects the minimal set of include directives for the file to be compilable. All other #include directives are considered unused.
Use the checkbox below to run inspection in header files.