You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
714 B
22 lines
714 B
2 years ago
|
"use strict";
|
||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||
|
const IssuePosition_1 = require("./IssuePosition");
|
||
|
function compareIssueLocations(locationA, locationB) {
|
||
|
if (locationA === locationB) {
|
||
|
return 0;
|
||
|
}
|
||
|
if (!locationA) {
|
||
|
return -1;
|
||
|
}
|
||
|
if (!locationB) {
|
||
|
return 1;
|
||
|
}
|
||
|
return (IssuePosition_1.compareIssuePositions(locationA.start, locationB.start) ||
|
||
|
IssuePosition_1.compareIssuePositions(locationA.end, locationB.end));
|
||
|
}
|
||
|
exports.compareIssueLocations = compareIssueLocations;
|
||
|
function formatIssueLocation(location) {
|
||
|
return `${location.start.line}:${location.start.column}`;
|
||
|
}
|
||
|
exports.formatIssueLocation = formatIssueLocation;
|