Add format-code.sh to run special clang verify
The phosphor-webui repo requires only certain directories
be verified with clang-format. This script utilizes the
override capabilities of the format-code.sh CI process
to handle this.
Change-Id: Icb759a7d94d2b007fa88261dacc39913b1076a0a
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/gulp_tasks/checkstyle.js b/gulp_tasks/checkstyle.js
index bd76a8b..0826352 100644
--- a/gulp_tasks/checkstyle.js
+++ b/gulp_tasks/checkstyle.js
@@ -3,29 +3,28 @@
'use strict';
-var options = require('../gulp-options.js'),
- gulp = require('gulp'),
- clean = require('gulp-clean'),
- eslint = require('gulp-eslint');
+var options = require('../gulp-options.js'), gulp = require('gulp'),
+ clean = require('gulp-clean'), eslint = require('gulp-eslint');
-var runSequence = require('run-sequence'),
- fs = require('fs');
+var runSequence = require('run-sequence'), fs = require('fs');
-gulp.task('checkstyle:clean', function () {
- return gulp
- .src([options.targetFolderPath + '/eslint-report-checkstyle.xml'], {'read': false})
- .pipe(clean({'force': true}));
+gulp.task('checkstyle:clean', function() {
+ return gulp
+ .src(
+ [options.targetFolderPath + '/eslint-report-checkstyle.xml'],
+ {'read': false})
+ .pipe(clean({'force': true}));
});
-gulp.task('checkstyle:eslint', function () {
- return gulp
- .src([options.srcFolderPath + '/**/*.js', options.excludePath])
- .pipe(eslint({'useEslintrc': true}))
- .pipe(eslint.format('checkstyle', function (output) {
- fs.writeFileSync(options.targetFolderPath + '/eslint-report-checkstyle.xml', output);
- }));
+gulp.task('checkstyle:eslint', function() {
+ return gulp.src([options.srcFolderPath + '/**/*.js', options.excludePath])
+ .pipe(eslint({'useEslintrc': true}))
+ .pipe(eslint.format('checkstyle', function(output) {
+ fs.writeFileSync(
+ options.targetFolderPath + '/eslint-report-checkstyle.xml', output);
+ }));
});
-module.exports = function (callback) {
- return runSequence('checkstyle:clean', 'checkstyle:eslint', callback);
+module.exports = function(callback) {
+ return runSequence('checkstyle:clean', 'checkstyle:eslint', callback);
};