From df59631303af17b0e41c16d497409a9b9ec707f1 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 4 Mar 2019 17:45:15 -0800 Subject: [PATCH] Remove columns: message, phyLoc. These were merged into Details a while back. --- components/ResultsPage.tsx | 2 +- components/parsing.ts | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/components/ResultsPage.tsx b/components/ResultsPage.tsx index 7daeb11..c2987d9 100644 --- a/components/ResultsPage.tsx +++ b/components/ResultsPage.tsx @@ -29,7 +29,7 @@ import {Colorize} from './Colorize.tsx'
{result.ruleDesc || result.rule}
Message
-
{result['message']}
+
{result.details.message}
Snippet
diff --git a/components/parsing.ts b/components/parsing.ts index 3d4b0d9..5602ff4 100644 --- a/components/parsing.ts +++ b/components/parsing.ts @@ -7,12 +7,12 @@ const randomInt = function(min: number, max: number) { // [min, max) const rowsToResults = (row: [any]) => { const result: any = {} - 'rule ruleDesc ruleObj source issuetype baselinestate uri path message snippet details'.split(' ').forEach((col: string, i: number) => (result as any)[col] = row[i]) + 'rule ruleDesc ruleObj source issuetype baselinestate uri path details'.split(' ').forEach((col: string, i: number) => (result as any)[col] = row[i]) return result } class Details { - readonly snippet + readonly snippet // aka phyLoc constructor(readonly message, phyLoc, readonly relatedLocations) { this.snippet = phyLoc } @@ -117,8 +117,6 @@ export async function parse(file) { baseline, uri, last(fpath(loc0).split('/')) || analysisTarget(r) || analysisTarget(loc0), // Sarif 1.0 temporary compat. - message, - phyLoc, // aka snippet new Details(message, phyLoc, r.relatedLocations), ] }).map(rowsToResults)