Skip to content

Commit d99f2ea

Browse files
committed
fix: code monkey progression
Signed-off-by: BoxBoxJason <[email protected]>
1 parent c3a76b2 commit d99f2ea

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/listeners/files.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ export namespace fileListeners {
9292

9393
// Retrieve file extension
9494
const extension = path.extname(uri.fsPath);
95-
const language: string =
96-
constants.labels.LANGUAGES_EXTENSIONS[extension];
95+
const language: string = constants.labels.LANGUAGES_EXTENSIONS[extension];
9796
if (language) {
9897
// Increase file created language count
9998
const languageCriteria =
@@ -172,6 +171,10 @@ export namespace fileListeners {
172171
await ProgressionController.increaseProgression(
173172
constants.criteria.LINES_OF_CODE_LANGUAGE.replace("%s", language)
174173
);
174+
// Increment generic lines of code progression
175+
await ProgressionController.increaseProgression(
176+
constants.criteria.LINES_OF_CODE
177+
);
175178
} else {
176179
// Count non-empty lines added in the change
177180
const nonEmptyLinesCount = change.text
@@ -184,6 +187,11 @@ export namespace fileListeners {
184187
constants.criteria.LINES_OF_CODE_LANGUAGE.replace("%s", language),
185188
nonEmptyLinesCount
186189
);
190+
// Increment generic lines of code progression
191+
await ProgressionController.increaseProgression(
192+
constants.criteria.LINES_OF_CODE,
193+
nonEmptyLinesCount
194+
);
187195
}
188196
}
189197
}

0 commit comments

Comments
 (0)