Skip to content

Commit 16a52f4

Browse files
committed
Merge pull request #30 from zobalogh/add-jshint-coverage-filter
Filtering out coverage tooling from jshint
2 parents a2d1007 + ee76ba2 commit 16a52f4

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

Gruntfile.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,17 @@ module.exports = function(grunt) {
4242
"loopfunc": true, // allow functions to be defined in loops
4343
"sub": true // don't warn that foo['bar'] should be written as foo.bar
4444
},
45-
all: [
46-
'*/*.js'
47-
],
45+
all: {
46+
src: ['*/*.js'],
47+
filter: function(filepath) { // on some developer machines the test coverage HTML report utilities cause further failures
48+
if(filepath.indexOf("coverage/prettify.js") === -1) {
49+
return true;
50+
} else {
51+
console.log("Filtered out " + filepath + " from the jshint checks");
52+
return false;
53+
}
54+
}
55+
},
4856
},
4957
inlinelint: {
5058
html: ['*/*.html']

0 commit comments

Comments
 (0)