Skip to content

Commit

Permalink
Consistent reporter output
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Oct 2, 2024
1 parent 1109cbf commit 94da7f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/knip/src/reporters/symbols.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const logIssueRecord = (issues: Issue[]) => {
const pos = issue.line === undefined ? '' : `:${issue.line}${issue.col === undefined ? '' : `:${issue.col}`}`;
const cell = `${relative(issue.filePath)}${pos}`;
table.cell('filePath', print(cell));
issue.isFixed && table.cell('fixed', print('(fixed)'));
issue.isFixed && table.cell('fixed', print('(removed)'));
table.newRow();
}
console.log(table.sort(['filePath', 'parentSymbol', 'symbol']).print().trim());
Expand All @@ -41,7 +41,7 @@ export default ({ report, issues, tagHints, configurationHints, noConfigHints, i
title && logTitle(title, issuesForType.length);
for (const issue of issuesForType) {
const relPath = toRelative(issue.filePath);
if (issue.isFixed) console.log(picocolors.gray(`${relPath} (deleted)`));
if (issue.isFixed) console.log(picocolors.gray(`${relPath} (removed)`));
else if (issue.severity === 'warn') console.log(picocolors.gray(relPath));
else console.log(relPath);
}
Expand Down

0 comments on commit 94da7f7

Please sign in to comment.