simplecpp icon indicating copy to clipboard operation
simplecpp copied to clipboard

refs #583 - report `CACHE_ERROR` when `simplecpp::FileDataCache::getFileId()` fails

Open firewave opened this issue 2 months ago • 2 comments

firewave avatar Nov 10 '25 01:11 firewave

> simplecpp e:\a.cpp


int i ;
e:\a.cpp:1: cache error: Failed to get ID for e:/a.h (GetFileInformationByHandleEx() failed with 'The parameter is incorrect.')
e:\a.cpp:1: missing header: Header not found: "a.h"

firewave avatar Nov 10 '25 01:11 firewave

I chose a different type so we not need to pipe the more verbose information from the generic missing include error.

The idea for hooking this up in Cppcheck would be to report this with --verbose or --check-config only.

It might make sense to cache it from CACHE_ERROR to some more generic as CACHE_MSG so we could pass on some information about the cache (like statistics). Introducing an additional list within the cache object would add more complexity to the integration.

firewave avatar Nov 11 '25 18:11 firewave