Remove columns: message, phyLoc.

These were merged into Details a while back.
This commit is contained in:
Jeff King 2019-03-04 17:45:15 -08:00
Родитель 820f7e4ae6
Коммит df59631303
2 изменённых файлов: 3 добавлений и 5 удалений

Просмотреть файл

@ -29,7 +29,7 @@ import {Colorize} from './Colorize.tsx'
<div className="resultsDetailsValue">{result.ruleDesc || result.rule}</div>
<div className="resultsDetailsSubtitle">Message</div>
<div className="resultsDetailsValue">{result['message']}</div>
<div className="resultsDetailsValue">{result.details.message}</div>
<div className="resultsDetailsSubtitle">Snippet</div>
<div className="resultsDetailsValue"><Colorize phyLoc={result['snippet']} /></div>

Просмотреть файл

@ -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)