Merge pull request #18914 from github/esteffin/bmn-include-file-resolution-statistics

C++ query to extract the number of errors due to include file resolution failure
This commit is contained in:
Jeroen Ketema
2025-03-04 15:13:45 +01:00
committed by GitHub

View File

@@ -0,0 +1,20 @@
/**
* @name Include file resolution status
* @description A count of successful includes and includes that failed to resolve.
* This query is for internal use only and may change without notice.
* @kind table
* @id cpp/include-resolution-status
*/
import cpp
/**
* A cannot open file error.
*
* Typically this is due to a missing include.
*/
class CannotOpenFileError extends CompilerError {
CannotOpenFileError() { this.hasTag(["cannot_open_file", "cannot_open_file_reason"]) }
}
select count(CannotOpenFileError e) as failed_includes, count(Include i) as successful_includes