Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions cpp/ql/src/Metrics/Internal/IncludeResolutionStatus.ql
Original file line number Diff line number Diff line change
@@ -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