Fix #14854 (import project: Handle forced include files from compilation database projects) by JonnyPtn · Pull Request #8641 · cppcheck-opensource/cppcheck
Sorry, I don't have access to the bug tracker so haven't been able to log an issue, but hoping it's simple enough
The problem is that if a project uses forced includes cppcheck does not process these when running via a compilation database which can cause errors.
I appreciate it's possible to workaround using cppchecks --include argument, but that means maintaining the force includes in multiple places, and can easily get out of sync with the actual project setup. There may also be file or config specific settings
This change parses those arguments from the project and respects them, with an accompanying test