Skip to content

Commit

Permalink
feat: pass filename to parsers as sourceRef (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
csmig authored Feb 16, 2024
1 parent 7302f24 commit 00f497f
Show file tree
Hide file tree
Showing 3 changed files with 153 additions and 86 deletions.
6 changes: 3 additions & 3 deletions lib/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ async function parseFileAndEnqueue (file, cb) {
allowAccept,
valueProcessor,
XMLParser,
scapBenchmarkMap
scapBenchmarkMap,
sourceRef: file
})
parseResult.file = file
logger.debug({component: component, message: `parse results`, results: parseResult})

cargoQueue.push( parseResult )
Expand All @@ -85,7 +85,7 @@ async function parseFileAndEnqueue (file, cb) {
stats: checklist.stats
})
}
logger.verbose({component: component, message: `results queued`, file: parseResult.file,
logger.verbose({component: component, message: `results queued`, file: parseResult.sourceRef,
target: parseResult.target.name, checklists: checklistInfo })
cb(null, parseResult)
}
Expand Down
Loading

0 comments on commit 00f497f

Please sign in to comment.