warnings.add('(XCResult) The `url` exists but it was failed to be parsed. url: $urlValue');
}
}
}
}
returnXCResultIssue._(
returnXCResultIssue._(
type:type,
type:type,
subType:subType,
subType:subType,
message:message,
message:message,
location:location,
warnings:warnings,
);
);
}
}
...
@@ -207,6 +229,8 @@ class XCResultIssue {
...
@@ -207,6 +229,8 @@ class XCResultIssue {
requiredthis.type,
requiredthis.type,
requiredthis.subType,
requiredthis.subType,
requiredthis.message,
requiredthis.message,
requiredthis.location,
requiredthis.warnings,
});
});
/// The type of the issue.
/// The type of the issue.
...
@@ -216,12 +240,21 @@ class XCResultIssue {
...
@@ -216,12 +240,21 @@ class XCResultIssue {
///
///
/// This is a more detailed category about the issue.
/// This is a more detailed category about the issue.
/// The possible values are `Warning`, `Semantic Issue'` etc.
/// The possible values are `Warning`, `Semantic Issue'` etc.
finalStringsubType;
finalString?subType;
/// Human readable message for the issue.
/// Human readable message for the issue.
///
///
/// This can be displayed to user for their information.
/// This can be displayed to user for their information.
finalStringmessage;
finalString?message;
/// The location where the issue occurs.
///
/// This is a re-formatted version of the "url" value in the json.
/// The format looks like <FileLocation>:<StartingLineNumber>:<StartingColumnNumber>.
finalString?location;
/// Warnings when constructing the issue object.
finalList<String>warnings;
}
}
/// The type of an `XCResultIssue`.
/// The type of an `XCResultIssue`.
...
@@ -236,3 +269,29 @@ enum XCResultIssueType {
...
@@ -236,3 +269,29 @@ enum XCResultIssueType {
/// This is for all the issues under the `errorSummaries` key in the xcresult.
/// This is for all the issues under the `errorSummaries` key in the xcresult.
error,
error,
}
}
// A typical location url string looks like file:///foo.swift#CharacterRangeLen=0&EndingColumnNumber=82&EndingLineNumber=7&StartingColumnNumber=82&StartingLineNumber=7.
//
// This function converts it to something like: /foo.swift:<StartingLineNumber>:<StartingColumnNumber>.