Last active
December 18, 2015 02:09
-
-
Save Lugribossk/5709321 to your computer and use it in GitHub Desktop.
JSHint bug with multiple input files and the Checkstyle reporter.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function example(unused) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Running "jshint:console_works" (jshint) task | |
>> 1 file lint free. | |
Running "jshint:checkstyle_works" (jshint) task | |
<?xml version="1.0" encoding="utf-8"?> | |
<checkstyle version="4.3"> | |
<file name="Gruntfile.js"> | |
</file> | |
</checkstyle> | |
Running "jshint:console_works2" (jshint) task | |
>> 2 files lint free. | |
Running "jshint:checkstyle_broken" (jshint) task | |
<?xml version="1.0" encoding="utf-8"?> | |
<checkstyle version="4.3"> | |
<file name="Gruntfile.js"> | |
</file> | |
<file name="example.js"> | |
<error line="1" column="0" severity="warning" message="Unused variable: 'example'" source="jshint.implied-unuseds" /> | |
</file> | |
</checkstyle> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global module*/ | |
module.exports = function (grunt) { | |
"use strict"; | |
var singleInput = ["Gruntfile.js"], | |
multiInput = ["Gruntfile.js", "example.js"], | |
unused; | |
grunt.initConfig({ | |
jshint: { | |
options: { | |
unused: false | |
}, | |
console_works: { | |
src: singleInput | |
}, | |
checkstyle_works: { | |
src: singleInput, | |
options: { | |
reporter: "checkstyle" | |
} | |
}, | |
console_works2: { | |
src: multiInput | |
}, | |
checkstyle_broken: { | |
src: multiInput, | |
options: { | |
reporter: "checkstyle" | |
} | |
} | |
} | |
}); | |
grunt.loadNpmTasks("grunt-contrib-jshint"); | |
grunt.registerTask("default", ["jshint"]); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment