|
|
@ -4,6 +4,10 @@ var fs = require('fs'); |
|
|
|
var async = require('async'); |
|
|
|
var async = require('async'); |
|
|
|
var glob = require('glob'); |
|
|
|
var glob = require('glob'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var autoGeneratedMarker =
|
|
|
|
|
|
|
|
"//------------------------------------------------------------------------------" + "\n" + |
|
|
|
|
|
|
|
"// <auto-generated>"; |
|
|
|
|
|
|
|
|
|
|
|
module.exports = function (params, processor) { |
|
|
|
module.exports = function (params, processor) { |
|
|
|
return { |
|
|
|
return { |
|
|
|
process: function () { |
|
|
|
process: function () { |
|
|
@ -33,6 +37,8 @@ module.exports = function (params, processor) { |
|
|
|
processor.onError("Unable to check file " + file + ": " + err); |
|
|
|
processor.onError("Unable to check file " + file + ": " + err); |
|
|
|
} else if (data.indexOf("\r\n") >= 0) { |
|
|
|
} else if (data.indexOf("\r\n") >= 0) { |
|
|
|
processor.onError("Windows-style EOL (0D0A) found in file " + file); |
|
|
|
processor.onError("Windows-style EOL (0D0A) found in file " + file); |
|
|
|
|
|
|
|
} else if (data.substr(1, autoGeneratedMarker.length) === autoGeneratedMarker || data.substr(0, autoGeneratedMarker.length) === autoGeneratedMarker) { |
|
|
|
|
|
|
|
processor.onInfo("Skipping auto-generated file " + file); |
|
|
|
} else if (data.indexOf("\t") >= 0 && data.indexOf(" ") >= 0) { |
|
|
|
} else if (data.indexOf("\t") >= 0 && data.indexOf(" ") >= 0) { |
|
|
|
processor.onError("Both tabs and spaces found in file " + file); |
|
|
|
processor.onError("Both tabs and spaces found in file " + file); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|