Skip to content

Commit

Permalink
feat: add diff error description prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
dargmuesli committed Oct 12, 2020
1 parent d8fd2c0 commit a1a2960
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ if (validate) {
const difference = diff.diffLines(md + '\n', readme)

if (difference.length > 1) {
console.error('The README is not up-2-date!\n' +
'Remember that newline diffs aren\'t visibly highlighted.')

difference.forEach((part) => {
let color = part.added ? 'green'
: part.removed ? 'red' : 'grey'
Expand Down

0 comments on commit a1a2960

Please sign in to comment.