fix extract traces
This commit is contained in:
parent
01c6423154
commit
2daee7ec2d
@ -36,6 +36,10 @@ interface TracesData {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Repo root, derived from this script's location (scripts/ -> repo root).
|
||||||
|
// Must NOT be hardcoded to a developer's machine, or CI checkouts see no files.
|
||||||
|
const BASE_DIR = path.resolve(import.meta.dir, "..");
|
||||||
|
|
||||||
const TRACES_PATTERN = /TRACES:\s*([^\n]+)/gi;
|
const TRACES_PATTERN = /TRACES:\s*([^\n]+)/gi;
|
||||||
const REQ_ID_PATTERN = /([A-Z]{2})-(\d{3})/g;
|
const REQ_ID_PATTERN = /([A-Z]{2})-(\d{3})/g;
|
||||||
|
|
||||||
@ -45,7 +49,7 @@ function extractRequirementIds(tracesString: string): string[] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getAllSourceFiles(): string[] {
|
function getAllSourceFiles(): string[] {
|
||||||
const baseDir = "/home/dtourolle/Development/JellyTau";
|
const baseDir = BASE_DIR;
|
||||||
const patterns = ["src", "src-tauri/src"];
|
const patterns = ["src", "src-tauri/src"];
|
||||||
const files: string[] = [];
|
const files: string[] = [];
|
||||||
|
|
||||||
@ -101,7 +105,7 @@ function extractTraces(): TracesData {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let totalTraces = 0;
|
let totalTraces = 0;
|
||||||
const baseDir = "/home/dtourolle/Development/JellyTau";
|
const baseDir = BASE_DIR;
|
||||||
|
|
||||||
const files = getAllSourceFiles();
|
const files = getAllSourceFiles();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user