mirror of
https://gitlab.com/aviortheking/code-stats-vscode.git
synced 2025-04-22 10:52:13 +00:00
Added code-runner-output and arduino-output to filtered out outputs
This commit is contained in:
parent
75f1767d3d
commit
a5430b9acf
@ -2,6 +2,13 @@
|
||||
|
||||
All notable changes to the "code-stats-vscode" extension will be documented in this file.
|
||||
|
||||
## [1.0.16] - 2020-01-06
|
||||
|
||||
### Changed
|
||||
|
||||
Updated dependencies.
|
||||
Filtered out certain output types like code runner output, etc.
|
||||
|
||||
## [1.0.15] - 2019-04-04
|
||||
|
||||
### Changed
|
||||
|
@ -24,6 +24,11 @@ This extension contributes the following settings:
|
||||
|
||||
## Release Notes
|
||||
|
||||
### 1.0.16
|
||||
|
||||
Updated dependencies.
|
||||
Added filtering out of some output languages like code runner, etc.
|
||||
|
||||
### 1.0.15
|
||||
|
||||
Added Q# to languages.
|
||||
|
@ -27,6 +27,12 @@ export class XpCounter {
|
||||
// wait 10s after each change in the document before sending an update
|
||||
private UPDATE_DELAY = 10000;
|
||||
|
||||
// List of detected output languages to filter out and not send to the backend.
|
||||
private filterOutLanguages: string[] = [
|
||||
"arduino-output",
|
||||
"code-runner-output"
|
||||
]
|
||||
|
||||
constructor(context: ExtensionContext) {
|
||||
this.pulse = new Pulse();
|
||||
this.initAPI();
|
||||
@ -127,8 +133,11 @@ export class XpCounter {
|
||||
}
|
||||
|
||||
private isSupportedLanguage(language: string): boolean {
|
||||
// todo: check supported languages
|
||||
// only update xp if one of supported languages
|
||||
// Check if detected language is something we don't want to send to backend like the code runner output
|
||||
if (this.filterOutLanguages.includes(language)) {
|
||||
console.log("Filtering out " + language);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user