mirror of
https://github.com/github/codeql-action.git
synced 2025-12-27 17:50:07 +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.
37 lines
834 B
TypeScript
37 lines
834 B
TypeScript
import { LineInfo } from './file';
|
|
export interface LocDirOptions {
|
|
cwd?: string;
|
|
include?: string[] | string;
|
|
exclude?: string[] | string;
|
|
analysisLanguages?: string[];
|
|
}
|
|
export interface LocResult {
|
|
files: string[];
|
|
info: LineInfo;
|
|
languages: {
|
|
[key: string]: LineInfo & {
|
|
sum: number;
|
|
};
|
|
};
|
|
}
|
|
/**
|
|
* Collect the info of a directory.
|
|
*/
|
|
export declare class LocDir {
|
|
private cwd;
|
|
private include;
|
|
private exclude;
|
|
private analysisLanguages?;
|
|
private allLanguages;
|
|
constructor(options: LocDirOptions);
|
|
/**
|
|
* Calculate directory info.
|
|
*/
|
|
loadInfo(): Promise<LocResult>;
|
|
/**
|
|
* Ignore analyzing this file if analysis languages are specified
|
|
* and this language is not one of them.
|
|
*/
|
|
private ignoreLanguage;
|
|
}
|