Skip to content

Commit 0270c1a

Browse files
committed
Merge pull request #347 from jklein/issue345
Fixes #345 - Using absolute paths for the excluded files and the files t...
2 parents 1a654f7 + 872e554 commit 0270c1a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/cli/common.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ function cli(api){
7676
function filterFiles(files, options) {
7777
var excludeList = options["exclude-list"],
7878
excludeFiles = [],
79-
filesToLint = files;
79+
filesToLint = files.map(api.getFullPath),
80+
fullPath;
8081

8182

8283
if (excludeList) {
@@ -91,8 +92,9 @@ function cli(api){
9192

9293
// Remove the excluded files from the list of files to lint
9394
excludeFiles.forEach(function(value){
94-
if (filesToLint.indexOf(value) > -1) {
95-
filesToLint.splice(filesToLint.indexOf(value),1);
95+
fullPath = api.getFullPath(value);
96+
if (filesToLint.indexOf(fullPath) > -1) {
97+
filesToLint.splice(filesToLint.indexOf(fullPath),1);
9698
}
9799
});
98100
}

0 commit comments

Comments
 (0)