Skip to content

Commit

Permalink
fix: strip compilation progress bar on Windows
Browse files Browse the repository at this point in the history
Rule now also matches the following lines:
```
[================================================] - 17 / 17
[                                                  ] - 1 / 74
[===============================================   ] - 71 / 74
```
  • Loading branch information
marc136 committed Mar 7, 2019
1 parent c743ad1 commit 750ebb4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/utils/formatElmCompilerErrors.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function stripRedundantInfo(error) {
// String the error message from the loader.
.replace(/Module build failed.*\nError.*\n/gm, '')
// Strip compilation progress-bar.
.replace(/\[=+\]\s-\s\d\s\/\s\d[\r\n\s]?/gm, '\n')
.replace(/\[[=\s]{3,}\]\s-\s\d+\s\/\s\d+[\r\n\s]+/gm, '')
);
}

Expand All @@ -34,7 +34,9 @@ module.exports = function formatElmCompilerErrors(messages) {
.replace(/(\n\s*)(\^+)/g, '$1' + error('$2'))
.replace(/(\d+)(\|>)/g, '$1' + error('$2'))
)
.map(stripRedundantInfo),
.map(stripRedundantInfo)
// drop errors that only contain whitespace
.filter(err => err.trim()),
warnings: warnings
}
: messages;
Expand Down

0 comments on commit 750ebb4

Please sign in to comment.