From 67347d39a25096d2a40be3e3029e973741c21510 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Mon, 22 Apr 2024 15:45:59 -0400 Subject: [PATCH] FIX: Start file count at 0 The -1 seems to have been copied from the legacy validator, which used -1 as an indicator that the value was uninitialized and then later replaced it with a `length()` call. Since we just increment it when processing each file, it makes sense to start at 0. --- bids-validator/src/summary/summary.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bids-validator/src/summary/summary.ts b/bids-validator/src/summary/summary.ts index 1112079ab..62622a437 100644 --- a/bids-validator/src/summary/summary.ts +++ b/bids-validator/src/summary/summary.ts @@ -69,7 +69,7 @@ export class Summary { schemaVersion: string constructor() { this.dataProcessed = false - this.totalFiles = -1 + this.totalFiles = 0 this.size = 0 this.sessions = new Set() this.subjects = new Set()