Commit b6a2dfbe authored by Rick Waldron's avatar Rick Waldron Committed by Dave Methvin

Improves handling of EOL whitespace error reporting

parent dd900460
...@@ -25,12 +25,12 @@ if ( jshint( src, config ) ) { ...@@ -25,12 +25,12 @@ if ( jshint( src, config ) ) {
jshint.errors.forEach(function( e ) { jshint.errors.forEach(function( e ) {
if ( !e ) { return; } if ( !e ) { return; }
var str = e.evidence ? e.evidence : ""; var str = e.evidence ? e.evidence : "",
character = e.character === true ? "EOL" : "C" + e.character;
if ( str ) { if ( str ) {
str = str.replace( /\t/g, " " ).trim(); str = str.replace( /\t/g, " " ).trim();
console.log( " [L" + e.line + ":" + character + "] " + e.reason + "\n " + str + "\n");
console.log( " [L" + e.line + ":C" + e.character + "] " + e.reason + "\n " + str + "\n");
} }
}); });
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment