lourenzo / gulp-jshint-xml-file-reporter Goto Github PK
View Code? Open in Web Editor NEWA JSHint reporter to be used by gulp-jshint that will provide a jslint.xml that can be used by CI tools as jenkins
License: MIT License
A JSHint reporter to be used by gulp-jshint that will provide a jslint.xml that can be used by CI tools as jenkins
License: MIT License
It would be nice if the reporter always produced a report file and not only if errors occurred. Currently once I correct a jshint warning my report file is not updated to indicate 0 errors and instead will contain the errors prior to the successful run.
It will throw an error like this:
events.js:72
throw er; // Unhandled 'error' event
^
Error: ENOENT, open 'test_out/jshint.xml'
If you have a clean task on your output folder, which removes all content and subfolders and then jshint is the first task which is running, then it can't write the output file because of a missing folder structure.
Workaround:
gulp.task('prepareStylecheck', function () {
//just create the output folder because of a reporter bug
return gulp.src(PATH_IN_SRC)
.pipe(gulp.dest(PATH_OUT_TESTRESULT));
});
gulp.task('stylecheck', ['prepareStylecheck'], function () {
return gulp.src(FILES_SRC)
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'))
.pipe(jshint.reporter(jshintXMLReporter))
.on('end', jshintXMLReporter.writeFile({
format: 'checkstyle',
filePath: PATH_OUT_TESTRESULT + 'checkstyle.xml'
}));
});
Hi,
I would be very grateful if you could create a new release through npm version
and create a new tag for the new updates that have been pulled into the repository recently.
Many thanks
Hi,
I would be very grateful if you could create a new release for version 0.4
Thanks :)
If the filePath
specifies a directory path that does not exist, createWriteStream
fails with
Error: ENOENT: no such file or directory, open 'path/to/jshint/results.xml'
createOutputStream
from the fs-extra package handles this correctly.
Hi,
I tried the plugin for the first time today, and i have an issue when i try to use the jshint-xml formatter instead of the default one (checkstyle).
Here are some inputs:
return gulp.src('app/scripts/**/*.js')
.pipe($.jshint())
.pipe($.jshint.reporter($.jshintXmlFileReporter))
.on('end', $.jshintXmlFileReporter.writeFile({
format: 'jshint_xml',
filePath: './jshint.xml'
}));
[14:13:18] Error: Cannot find module './lib/jshint_xml_emitter'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at loadFormatter (/home/spiroid/test/node_modules/gulp-jshint-xml-file-reporter/index.js:17:12)
at Object.exports.writeFile (/home/spiroid/test/node_modules/gulp-jshint-xml-file-reporter/index.js:34:26)
at Gulp.<anonymous> (/home/spiroid/test/gulp/lint.js:19:44)
at module.exports (/home/spiroid/test/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/home/spiroid/test/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/home/spiroid/test/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
Did i forget something in my gulp task / configuration ?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.