mirror of
https://github.com/github/codeql-action.git
synced 2025-12-27 09:40:17 +08:00
This change passes in a list of file types to the line counting analysis. These are the languages for the databases being analyzed. Line count analysis is restricted to these files.
34 lines
691 B
TypeScript
34 lines
691 B
TypeScript
/**
|
|
* detect file info
|
|
*/
|
|
export interface LineInfo {
|
|
total: number;
|
|
code: number;
|
|
comment: number;
|
|
}
|
|
export interface FileInfo {
|
|
name: string;
|
|
languages: string;
|
|
size: number;
|
|
lines: LineInfo;
|
|
}
|
|
/**
|
|
* Collect language info for a single file
|
|
*/
|
|
export declare class LocFile {
|
|
private debug;
|
|
path: string;
|
|
private rawPath;
|
|
private languages;
|
|
/**
|
|
* Creates an instance of LocFile.
|
|
*/
|
|
constructor(rawPath: string, debug?: boolean);
|
|
private filterData;
|
|
/**
|
|
* Get file info when LocFile init
|
|
*/
|
|
getFileInfo(data?: string): Promise<FileInfo>;
|
|
getFileInfoByContent(name: string, data: string): FileInfo;
|
|
}
|