mirror of
https://github.com/github/codeql-action.git
synced 2026-01-02 20:50:05 +08:00
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.
This commit is contained in:
8
node_modules/github-linguist/src/languages.ts
generated
vendored
8
node_modules/github-linguist/src/languages.ts
generated
vendored
@@ -77,6 +77,14 @@ export class Languages {
|
||||
public getExtensionMap() {
|
||||
return this.extensionMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* get file type through a path
|
||||
*/
|
||||
public getType(path: string): string {
|
||||
const fileExtension = `.${path.split('.').pop()}`;
|
||||
return this.extensionMap[fileExtension] || '';
|
||||
}
|
||||
}
|
||||
|
||||
export interface Regexes {
|
||||
|
||||
Reference in New Issue
Block a user