Skip to content

Commit f354199

Browse files
authored
Merge pull request #148 from IBM/feature/imd_log_lines
Enhance log message formatting with line numbers
2 parents ab155fb + f5c8899 commit f354199

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cli/src/builders/imd.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export class ImpactMarkdown {
7474
lines.push(
7575
`##### \`${relativePath}\``,
7676
``,
77-
...fileLogs.map(log => `* ${LogEmoji[log.type] || `❔`} ${log.message}`),
77+
...fileLogs.map(log => `* ${LogEmoji[log.type] || `❔`}${log.line ? `line ${log.line}:` : ''} ${log.message}`),
7878
``
7979
)
8080
}
@@ -110,7 +110,7 @@ export class ImpactMarkdown {
110110
warningMarkdown.push(
111111
`**\`${relativePath}\`**`,
112112
``,
113-
...logs.filter(l => l.type === 'warning').map(log => `* [ ] ${LogEmoji[log.type] || `❔`} ${log.message}`),
113+
...logs.filter(l => l.type === 'warning').map(log => `* [ ] ${LogEmoji[log.type] || `❔`}${log.line ? `line ${log.line}:` : ''} ${log.message}`),
114114
``
115115
)
116116
}

0 commit comments

Comments
 (0)