code-base-investigator icon indicating copy to clipboard operation
code-base-investigator copied to clipboard

Warning for include files is unclear

Open Pennycook opened this issue 1 year ago • 0 comments

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 #include directive
  • 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

Pennycook avatar Feb 06 '24 21:02 Pennycook