Implemented auto-generated files ignore

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 9 years ago
parent 65fb8a4b76
commit 069d6b47aa
  1. 6
      BuildServer/lib/tasks/dotnetcheckstyle.js

@ -4,6 +4,10 @@ var fs = require('fs');
var async = require('async');
var glob = require('glob');
var autoGeneratedMarker =
"//------------------------------------------------------------------------------" + "\n" +
"// <auto-generated>";
module.exports = function (params, processor) {
return {
process: function () {
@ -33,6 +37,8 @@ module.exports = function (params, processor) {
processor.onError("Unable to check file " + file + ": " + err);
} else if (data.indexOf("\r\n") >= 0) {
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) {
processor.onError("Both tabs and spaces found in file " + file);
} else {

Loading…
Cancel
Save