-
Notifications
You must be signed in to change notification settings - Fork 4
[Gulp] Continuous Integration (CI)
For CI we have validation for PHP and JS files, for PHP we follow the code standard from WordPress and for the JS we follow the standard from airbnb.
This will allow you to integrate your project with travis to have consistent code across the project.
This tasks execute js:ci
and php:ci
(more information about this tasks below) in order to validate the code standard from php and JS. if there is an error this tasks will exit the gulp tasks with exit code of 1
this maybe useful for travis.
gulp ci
This task will run the validation of the code standard in the specified in the array phpFiles
, this array of files can be modified in the gulpfile.js
in order to exclude or add more files.
Will validate agains the rules from the PHPSniffer to see if the code matches the rules from WP Standard for PHP. It will exit with code 1
and generate an error in the gulp execution.
gulp php:ci
This task will run the validation of the code standard in the specified in the array jsFiles
this array of files, can be modified in the gulpfile.js
in order to exclude or add more files.
Will validate agains the rules from the .jshintrc
and .jscsrc
to see if the code matches the rules from airbnb for the JS files. It will exit with code 1
and generate an error in the gulp execution.
gulp js:ci
This task depend in another two tasks:
Will validate agains the rules from the .jshintrc
to see if the code matches the rules from airbnb for the JS files. It will exit with code 1
and generate an error in the gulp execution.
gulp js:hint-ci
Will validate agains the rules from the .jscsrc
to see if the code matches the rules from airbnb for the JS files. It will exit with code 1
and generate an error in the gulp execution.
gulp js:hint-ci