Merge pull request #1329 from nasa/jscs-reports-1314

[Build] Output JSCS reports
This commit is contained in:
Pete Richards 2016-11-17 11:08:30 -08:00 committed by GitHub
commit c98286d426
2 changed files with 8 additions and 0 deletions

View File

@ -126,10 +126,17 @@ gulp.task('lint', function () {
gulp.task('checkstyle', function () {
var jscs = require('gulp-jscs');
var mkdirp = require('mkdirp');
var reportName = 'jscs-html-report.html';
var reportPath = path.resolve(paths.reports, 'checkstyle', reportName);
var moveReport = fs.rename.bind(fs, reportName, reportPath, _.noop);
mkdirp.sync(path.resolve(paths.reports, 'checkstyle'));
return gulp.src(paths.scripts)
.pipe(jscs())
.pipe(jscs.reporter())
.pipe(jscs.reporter('jscs-html-reporter')).on('finish', moveReport)
.pipe(jscs.reporter('fail'));
});

View File

@ -21,6 +21,7 @@
"gulp-sass": "^2.2.0",
"gulp-sourcemaps": "^1.6.0",
"jasmine-core": "^2.3.0",
"jscs-html-reporter": "^0.1.0",
"jsdoc": "^3.3.2",
"jshint": "^2.7.0",
"karma": "^0.13.3",