Files
codeql-action/node_modules/github-linguist/dist/directory.d.ts
Andrew Eisenberg ee2346270d Avoid analyzing excluded language files for line counting
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.
2021-04-28 16:07:55 -07:00

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;
}