( file: string, position: SourceFileLocation['position'], outputDir: string, )
| 174 | } |
| 175 | |
| 176 | export function formatFileLink( |
| 177 | file: string, |
| 178 | position: SourceFileLocation['position'], |
| 179 | outputDir: string, |
| 180 | ): string { |
| 181 | const relativePath = path.posix.relative(outputDir, file); |
| 182 | const env = getEnvironmentType(); |
| 183 | |
| 184 | switch (env) { |
| 185 | case 'vscode': |
| 186 | return position ? `${relativePath}#L${position.startLine}` : relativePath; |
| 187 | case 'github': |
| 188 | return formatGitHubLink(file, position); |
| 189 | case 'gitlab': |
| 190 | return formatGitLabLink(file, position); |
| 191 | default: |
| 192 | return relativePath; |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | export function formatSeverityCounts( |
| 197 | severityCounts: Partial<Record<IssueSeverity, number>>, |
no test coverage detected