Unused Include Directive
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.
Locating this inspection
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
OCUnusedIncludeDirective- Via Settings dialog
Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.
Inspection options
Here you can find the description of settings available for the Unused Include Directive inspection, and the reference of their default values.
- Run inspection in header files
Not selected
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | CLion, 2024.2 |