Changeset 45665
- Timestamp:
- 07/19/2019 07:47:16 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Gruntfile.js
r45607 r45665 1443 1443 var flags = this.flags; 1444 1444 var args = changedFiles.php; 1445 if ( flags.travis ) { 1446 args = [ 'tests' ]; 1445 if ( flags.travisErrors ) { 1446 // We can check the entire codebase for coding standards errors. 1447 args = [ 'lint:errors' ]; 1448 } else if ( flags.travisWarnings ) { 1449 // We can check the tests directory for errors and warnings. 1450 args = [ 'lint', 'tests' ]; 1451 } else { 1452 args.unshift( 'lint' ); 1447 1453 } 1448 args.unshift( 'lint' );1449 1454 grunt.util.spawn( { 1450 1455 cmd: 'composer', … … 1463 1468 grunt.registerTask('travis:js', 'Runs Javascript Travis CI tasks.', [ 'jshint:corejs', 'qunit:compiled' ]); 1464 1469 grunt.registerTask('travis:phpunit', 'Runs PHPUnit Travis CI tasks.', [ 'build', 'phpunit' ]); 1465 grunt.registerTask('travis:phpcs', 'Runs PHP Coding Standards Travis CI tasks.', [ 'format:php:error', 'lint:php:travis :error' ]);1470 grunt.registerTask('travis:phpcs', 'Runs PHP Coding Standards Travis CI tasks.', [ 'format:php:error', 'lint:php:travisErrors:error', 'lint:php:travisWarnings:error' ]); 1466 1471 1467 1472 // Patch task. -
trunk/composer.json
r45600 r45665 15 15 }, 16 16 "scripts": { 17 "format": "phpcbf --standard=phpcs.xml.dist --report-summary --report-source", 18 "lint": "phpcs --standard=phpcs.xml.dist --report-summary --report-source" 17 "format": "phpcbf --standard=phpcs.xml.dist --report-summary --report-source --cache -d memory_limit=256M", 18 "lint": "phpcs --standard=phpcs.xml.dist --report-summary --report-source --cache -d memory_limit=256M", 19 "lint:errors": "phpcs --standard=phpcs.xml.dist --report-summary --report-source --cache -d memory_limit=256M -n" 19 20 } 20 21 } -
trunk/phpcs.xml.dist
r45664 r45665 5 5 <rule ref="WordPress-Core"/> 6 6 <rule ref="WordPress.CodeAnalysis.EmptyStatement"/> 7 8 <!-- These rules are being set as warnings instead of errors, so we can error check the entire codebase. --> 9 <rule ref="WordPress.PHP.YodaConditions.NotYoda"> 10 <type>warning</type> 11 </rule> 12 <rule ref="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase"> 13 <type>warning</type> 14 </rule> 15 <rule ref="WordPress.DB.PreparedSQL.InterpolatedNotPrepared"> 16 <type>warning</type> 17 </rule> 18 <rule ref="WordPress.DB.PreparedSQL.NotPrepared"> 19 <type>warning</type> 20 </rule> 21 <rule ref="WordPress.Files.FileName.InvalidClassFileName"> 22 <type>warning</type> 23 </rule> 7 24 8 25 <rule ref="WordPress.NamingConventions.ValidVariableName">
Note: See TracChangeset
for help on using the changeset viewer.