Skip to content

Commit b6a4060

Browse files
committed
Merge pull request #83 from codeclimate/will/rm-exclude-paths-support
Remove `exclude_paths` support
2 parents 6fe9de1 + c6dc243 commit b6a4060

File tree

1 file changed

+2
-29
lines changed

1 file changed

+2
-29
lines changed

bin/eslint.js

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -105,30 +105,6 @@ function prunePathsWithinSymlinks(paths) {
105105
});
106106
}
107107

108-
function exclusionBasedFileListBuilder(excludePaths) {
109-
// Uses glob to traverse code directory and find files to analyze,
110-
// excluding files passed in with by CLI config, and including only
111-
// files in the list of desired extensions.
112-
//
113-
// Deprecated style of file expansion, supported for users of the old CLI.
114-
return function(extensions) {
115-
var analysisFiles = [];
116-
var allFiles = glob.sync("/code/**/**", {});
117-
118-
prunePathsWithinSymlinks(allFiles).forEach(function(file, i, a){
119-
if(excludePaths.indexOf(file.split("/code/")[1]) < 0) {
120-
if(fs.lstatSync(file).isFile()) {
121-
if (!isFileIgnoredByLibrary(file) && isFileWithMatchingExtension(file, extensions)) {
122-
analysisFiles.push(file);
123-
}
124-
}
125-
}
126-
});
127-
128-
return analysisFiles;
129-
};
130-
}
131-
132108
function inclusionBasedFileListBuilder(includePaths) {
133109
// Uses glob to expand the files and directories in includePaths, filtering
134110
// down to match the list of desired extensions.
@@ -168,12 +144,9 @@ runWithTiming("engineConfig", function () {
168144
buildFileList = inclusionBasedFileListBuilder(
169145
engineConfig.include_paths
170146
);
171-
} else if (engineConfig.exclude_paths) {
172-
var ignores = engineConfig.exclude_paths;
173-
buildFileList = exclusionBasedFileListBuilder(ignores);
174147
} else {
175-
// No includes or excludes, let's try with everything
176-
buildFileList = exclusionBasedFileListBuilder([]);
148+
// No explicit includes, let's try with everything
149+
buildFileList = inclusionBasedFileListBuilder(["./"]);
177150
}
178151

179152
var userConfig = engineConfig.config || {};

0 commit comments

Comments
 (0)