code-base-investigator
code-base-investigator copied to clipboard
Warning for include files is unclear
Feature/behavior summary
The warning message for an include file that cannot be found is:
[WARNING ] /path/to/file:line: 'path' not found
We should change the message to make it clear that:
- It is related to an
#includedirective - It may affect the correctness of the divergence calculation
- It is more important to pay attention to for non-system headers
Request attributes
- [ ] Would this be a refactor of existing code?
- [ ] Does this proposal require new package dependencies?
- [ ] Would this change break backwards compatibility?
Related issues
No response
Solution description
We should look at how other tools handle multi-line warnings. But something like the below might work.
For non-system headers:
[WARNING ] /path/to/file:line: #include "path"
Header file 'path' not found.
Ignoring this warning is likely to impact calculations.
Check include paths.
For system headers:
[WARNING ] /path/to/file:line: #include <path>
System header file 'path' not found.
Ignoring this warning is likely to be safe.
Consider specifying additional include paths in the importcfg.
...or we could consider separate "warning" and "severe warning" categories.
Additional notes
No response