(issue: IssueFragment)
| 144 | } |
| 145 | |
| 146 | function transformGQLIssue(issue: IssueFragment): Issue { |
| 147 | return { |
| 148 | message: issue.message, |
| 149 | severity: lowercase(issue.severity), |
| 150 | ...(issue.source?.__typename === 'SourceCodeLocation' && { |
| 151 | source: { |
| 152 | file: issue.source.filePath, |
| 153 | ...(issue.source.startLine != null && { |
| 154 | position: { |
| 155 | startLine: issue.source.startLine, |
| 156 | ...(issue.source.startColumn != null && { |
| 157 | startColumn: issue.source.startColumn, |
| 158 | }), |
| 159 | ...(issue.source.endLine != null && { |
| 160 | endLine: issue.source.endLine, |
| 161 | }), |
| 162 | ...(issue.source.endColumn != null && { |
| 163 | endColumn: issue.source.endColumn, |
| 164 | }), |
| 165 | }, |
| 166 | }), |
| 167 | }, |
| 168 | }), |
| 169 | ...(issue.source?.__typename === 'SourceUrlLocation' && { |
| 170 | source: { |
| 171 | url: issue.source.url, |
| 172 | ...(issue.source.snippet != null && { |
| 173 | snippet: issue.source.snippet, |
| 174 | }), |
| 175 | ...(issue.source.selector != null && { |
| 176 | selector: issue.source.selector, |
| 177 | }), |
| 178 | }, |
| 179 | }), |
| 180 | }; |
| 181 | } |
| 182 | |
| 183 | function transformGQLTable(table: TableFragment): Table { |
| 184 | if (!table.header) { |
nothing calls this directly
no test coverage detected