(issue: LintIssue)
| 59 | } |
| 60 | |
| 61 | function convertIssue(issue: LintIssue): Issue { |
| 62 | return { |
| 63 | message: truncateIssueMessage(issue.message), |
| 64 | severity: convertSeverity(issue.severity), |
| 65 | source: { |
| 66 | file: issue.filePath, |
| 67 | ...(issue.line > 0 && { |
| 68 | position: { |
| 69 | startLine: issue.line, |
| 70 | ...(issue.column > 0 && { startColumn: issue.column }), |
| 71 | ...(issue.endLine && |
| 72 | issue.endLine > 0 && { |
| 73 | endLine: issue.endLine, |
| 74 | }), |
| 75 | ...(issue.endColumn && |
| 76 | issue.endColumn > 0 && { endColumn: issue.endColumn }), |
| 77 | }, |
| 78 | }), |
| 79 | }, |
| 80 | }; |
| 81 | } |
| 82 | |
| 83 | function convertSeverity(severity: Linter.Severity): IssueSeverity { |
| 84 | switch (severity) { |
nothing calls this directly
no test coverage detected