if (lastIssue.component !== openIssue.component) {
return true;
}
- return lastIssue.line != null && lastIssue.line > to;
+ return lastIssue.textRange != null && lastIssue.textRange.endLine > to;
};
if (done(issues, paging)) {
return (
<div ref={node => (this.node = node)}>
<SourceViewer
- aroundLine={openIssue.line}
+ aroundLine={openIssue.textRange ? openIssue.textRange.endLine : undefined}
component={openIssue.component}
displayAllIssues={true}
highlightedLocations={locations}
const displayFiltered = this.props.filterLine != null;
const hasIssues = this.props.issues.length > 0;
- const hasFileIssues = hasIssues && this.props.issues.some(issue => !issue.line);
+ const hasFileIssues = hasIssues && this.props.issues.some(issue => !issue.textRange);
return (
<div>
const lastIssue = issues[issues.length - 1];
- if ((lastIssue.line != null && lastIssue.line > toLine) || issues.length < pageSize) {
+ if (
+ (lastIssue.textRange != null && lastIssue.textRange.endLine > toLine) ||
+ issues.length < pageSize
+ ) {
return issues;
}
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
"key": "AVsae-CQS-9G3txfbFN2",
- "line": 26,
+ "line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
"organization": "myorg",
"project": "myproject",
"rule": "javascript:S1067",
"secondaryLocations": Array [],
+ "textRange": Object {
+ "endLine": 26,
+ "endOffset": 15,
+ "startLine": 25,
+ "startOffset": 0,
+ },
}
}
onFail={[Function]}
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
"key": "AVsae-CQS-9G3txfbFN2",
- "line": 26,
+ "line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
"organization": "myorg",
"project": "myproject",
"rule": "javascript:S1067",
"secondaryLocations": Array [],
+ "textRange": Object {
+ "endLine": 26,
+ "endOffset": 15,
+ "startLine": 25,
+ "startOffset": 0,
+ },
}
}
onFail={[Function]}
"creationDate": "2017-03-01T09:36:01+0100",
"flows": Array [],
"key": "AVsae-CQS-9G3txfbFN2",
- "line": 26,
+ "line": 25,
"message": "Reduce the number of conditional operators (4) used in the expression",
"organization": "myorg",
"project": "myproject",
"rule": "javascript:S1067",
"secondaryLocations": Array [],
+ "textRange": Object {
+ "endLine": 26,
+ "endOffset": 15,
+ "startLine": 25,
+ "startOffset": 0,
+ },
}
}
onFail={[Function]}