Skip to content

Commit c98286d

Browse files
authored
Merge pull request #1329 from nasa/jscs-reports-1314
[Build] Output JSCS reports
2 parents d368bc2 + 242eb6d commit c98286d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

gulpfile.js

+7
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,17 @@ gulp.task('lint', function () {
126126

127127
gulp.task('checkstyle', function () {
128128
var jscs = require('gulp-jscs');
129+
var mkdirp = require('mkdirp');
130+
var reportName = 'jscs-html-report.html';
131+
var reportPath = path.resolve(paths.reports, 'checkstyle', reportName);
132+
var moveReport = fs.rename.bind(fs, reportName, reportPath, _.noop);
133+
134+
mkdirp.sync(path.resolve(paths.reports, 'checkstyle'));
129135

130136
return gulp.src(paths.scripts)
131137
.pipe(jscs())
132138
.pipe(jscs.reporter())
139+
.pipe(jscs.reporter('jscs-html-reporter')).on('finish', moveReport)
133140
.pipe(jscs.reporter('fail'));
134141
});
135142

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"gulp-sass": "^2.2.0",
2222
"gulp-sourcemaps": "^1.6.0",
2323
"jasmine-core": "^2.3.0",
24+
"jscs-html-reporter": "^0.1.0",
2425
"jsdoc": "^3.3.2",
2526
"jshint": "^2.7.0",
2627
"karma": "^0.13.3",

0 commit comments

Comments
 (0)