Use path.extname for some extension checks

This commit is contained in:
Michael B. Gale
2025-09-30 11:55:04 +01:00
parent 93711d3d89
commit ad086e4d90
10 changed files with 1584 additions and 1574 deletions
+3 -2
View File
@@ -480,8 +480,9 @@ export async function getGroupedSarifFilePaths(
const results = {};
if (stats.isDirectory()) {
let sarifFiles = findSarifFilesInDir(sarifPath, (name) =>
name.endsWith(".sarif"),
let sarifFiles = findSarifFilesInDir(
sarifPath,
(name) => path.extname(name) === ".sarif",
);
logger.debug(
`Found the following .sarif files in ${sarifPath}: ${sarifFiles.join(", ")}`,