Skip to content
This repository has been archived by the owner. It is now read-only.

Introduce automated Travis CI build testing into 2016. #23

Closed
wants to merge 1 commit into from

Conversation

@philiparthurmoore
Copy link
Contributor

@philiparthurmoore philiparthurmoore commented Aug 29, 2015

There will no doubt be a ton of pull requests that come in for Twenty Sixteen, and with every PR that comes in, there’s a chance that something can break. One of the great things about GitHub / Travis CI for Twenty Sixteen is that we can now automatically check if someone’s pull request is a good one (at least in the eyes of automation) and then act on it.

This pull request introduces an empty scaffold for automated testing into 2016; the decisions on which coding standards rules to ignore or not ignore will be left up to later discussions, so please consider this PR to address and only address the very real need to automatically test the vast number of PRs that we can expect to receive in the coming weeks for the new default theme.

This will require someone from the WordPress team to turn the switch on for this in Travis CI. A Magnum CI alternative can be created if people aren’t too keen on Travis CI for whatever reason.

2015-08-29_21-49-27

Errors on initial scaffolding can be found here:
https://travis-ci.org/philiparthurmoore/twentysixteen/jobs/77820981

Using worker: worker-linux-docker-e8c9a601.prod.travis-ci.org:travis-linux-2

Build system information
Build language: php
Build image provisioning date and time
Thu Feb  5 15:09:33 UTC 2015
Operating System Details
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.5 LTS
Release:    12.04
Codename:   precise
Linux Version
3.13.0-29-generic
Cookbooks Version
a68419e https://github.com/travis-ci/travis-cookbooks/tree/a68419e
GCC version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

LLVM version
clang version 3.4 (tags/RELEASE_34/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Pre-installed Ruby versions
ruby-1.9.3-p551
Pre-installed Node.js versions
v0.10.36
Pre-installed Go versions
1.4.1
Redis version
redis-server 2.8.19
riak version
2.0.2
MongoDB version
MongoDB 2.4.12
CouchDB version
couchdb 1.6.1
Neo4j version
1.9.4
RabbitMQ Version
3.4.3
ElasticSearch version
1.4.0
Installed Sphinx versions
2.0.10
2.1.9
2.2.6
Default Sphinx version
2.2.6
Installed Firefox version
firefox 31.0esr
PhantomJS version
1.9.8
ant -version
Apache Ant(TM) version 1.8.2 compiled on December 3 2011
mvn -version
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T17:29:23+00:00)
Maven home: /usr/local/maven
Java version: 1.7.0_76, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-oracle/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "3.13.0-29-generic", arch: "amd64", family: "unix"

$ git clone --depth=50 --branch=master git://github.com/philiparthurmoore/twentysixteen.git philiparthurmoore/twentysixteen
Cloning into 'philiparthurmoore/twentysixteen'...
remote: Counting objects: 111, done.
remote: Compressing objects: 100% (85/85), done.
remote: Total 111 (delta 43), reused 91 (delta 23), pack-reused 0
Receiving objects: 100% (111/111), 370.06 KiB | 0 bytes/s, done.
Resolving deltas: 100% (43/43), done.
Checking connectivity... done.
$ cd philiparthurmoore/twentysixteen
$ git checkout -qf 40fc9d51a529bb06ff117abe7b399ba6ed4620e9

This job is running on container-based infrastructure, which does not allow use of 'sudo', setuid and setguid executables.
If you require sudo, add 'sudo: required' to your .travis.yml
See http://docs.travis-ci.com/user/workers/container-based-infrastructure/ for details.

Setting environment variables from .travis.yml
$ export WP_VERSION=master
$ export WP_MULTISITE=0

$ phpenv global 5.5 2>/dev/null
$ php --version
PHP 5.5.21 (cli) (built: Feb 12 2015 01:29:17) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
    with Xdebug v2.2.7, Copyright (c) 2002-2015, by Derick Rethans
$ composer --version
Warning: This development build of composer is over 30 days old. It is recommended to update it by running "/home/travis/.phpenv/versions/5.5/bin/composer self-update" to get the latest version.
Composer version 1.0-dev (1d8f05f1dd0e390f253f79ea86cd505178360019) 2015-02-11 11:31:57

$ export WP_DEVELOP_DIR=/tmp/wordpress/
$ mkdir -p $WP_DEVELOP_DIR
$ git clone --depth=1 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $WP_DEVELOP_DIR
Cloning into '/tmp/wordpress'...
remote: Counting objects: 2037, done.
remote: Compressing objects: 100% (1898/1898), done.
remote: Total 2037 (delta 173), reused 1081 (delta 67)
Receiving objects: 100% (2037/2037), 9.68 MiB | 7.26 MiB/s, done.
Resolving deltas: 100% (173/173), done.
Checking connectivity... done.
$ theme_slug=$(basename $(pwd))
$ theme_dir=$WP_DEVELOP_DIR/src/wp-content/themes/$theme_slug
$ cd ..
$ mv $theme_slug $theme_dir
$ cd $WP_DEVELOP_DIR
$ echo $WP_DEVELOP_DIR
/tmp/wordpress/
$ cp wp-tests-config-sample.php wp-tests-config.php
$ sed -i "s/youremptytestdbnamehere/wordpress_test/" wp-tests-config.php
$ sed -i "s/yourusernamehere/root/" wp-tests-config.php
$ sed -i "s/yourpasswordhere//" wp-tests-config.php
$ mysql -e 'CREATE DATABASE wordpress_test;' -uroot
$ git clone https://github.com/squizlabs/PHP_CodeSniffer.git php-codesniffer
Cloning into 'php-codesniffer'...
remote: Counting objects: 63521, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 63521 (delta 4), reused 0 (delta 0), pack-reused 63507
Receiving objects: 100% (63521/63521), 100.09 MiB | 22.39 MiB/s, done.
Resolving deltas: 100% (35089/35089), done.
Checking connectivity... done.
$ git clone https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git wordpress-coding-standards
Cloning into 'wordpress-coding-standards'...
remote: Counting objects: 3856, done.
remote: Compressing objects: 100% (40/40), done.
remote: Total 3856 (delta 15), reused 0 (delta 0), pack-reused 3816
Receiving objects: 100% (3856/3856), 720.06 KiB | 0 bytes/s, done.
Resolving deltas: 100% (2164/2164), done.
Checking connectivity... done.
$ cd php-codesniffer
$ scripts/phpcs --config-set installed_paths ../wordpress-coding-standards
Config value "installed_paths" added successfully
$ cd $theme_dir
$ phpenv rehash
$ find . \( -name '*.php' \) -exec php -lf {} \;
No syntax errors detected in ./404.php
No syntax errors detected in ./archive.php
No syntax errors detected in ./comments.php
No syntax errors detected in ./footer.php
No syntax errors detected in ./functions.php
No syntax errors detected in ./header.php
No syntax errors detected in ./image.php
No syntax errors detected in ./inc/back-compat.php
No syntax errors detected in ./inc/custom-header.php
No syntax errors detected in ./inc/customizer.php
No syntax errors detected in ./inc/template-tags.php
No syntax errors detected in ./index.php
No syntax errors detected in ./page.php
No syntax errors detected in ./search.php
No syntax errors detected in ./sidebar-content-bottom.php
No syntax errors detected in ./sidebar.php
No syntax errors detected in ./single.php
No syntax errors detected in ./template-parts/biography.php
No syntax errors detected in ./template-parts/content-none.php
No syntax errors detected in ./template-parts/content-page.php
No syntax errors detected in ./template-parts/content-search.php
No syntax errors detected in ./template-parts/content-single.php
No syntax errors detected in ./template-parts/content.php

The command "find . \( -name '*.php' \) -exec php -lf {} \;" exited with 0.
$ $WP_DEVELOP_DIR/php-codesniffer/scripts/phpcs -p -s -v -n . --standard=./codesniffer.ruleset.xml --extensions=php
Registering sniffs in the WordPress Theme Coding Standards standard... DONE (76 sniffs registered)
Creating file list... DONE (23 files in queue)
Changing into directory /tmp/wordpress/src/wp-content/themes/twentysixteen
Processing 404.php [PHP => 110 tokens in 31 lines]... DONE in 14ms (0 errors, 0 warnings)
Processing archive.php [PHP => 317 tokens in 66 lines]... DONE in 33ms (1 errors, 0 warnings)
Processing comments.php [PHP => 286 tokens in 58 lines]... DONE in 30ms (4 errors, 0 warnings)
Processing footer.php [PHP => 314 tokens in 59 lines]... DONE in 31ms (2 errors, 0 warnings)
Processing functions.php [PHP => 2314 tokens in 330 lines]... DONE in 238ms (45 errors, 0 warnings)
Processing header.php [PHP => 604 tokens in 84 lines]... DONE in 62ms (5 errors, 0 warnings)
Processing image.php [PHP => 589 tokens in 106 lines]... DONE in 64ms (6 errors, 0 warnings)
Changing into directory /tmp/wordpress/src/wp-content/themes/twentysixteen/inc
Processing back-compat.php [PHP => 402 tokens in 63 lines]... DONE in 43ms (4 errors, 0 warnings)
Processing custom-header.php [PHP => 467 tokens in 91 lines]... DONE in 46ms (8 errors, 0 warnings)
Processing customizer.php [PHP => 3415 tokens in 1025 lines]... DONE in 342ms (26 errors, 0 warnings)
Processing template-tags.php [PHP => 1689 tokens in 238 lines]... DONE in 191ms (36 errors, 0 warnings)
Changing into directory /tmp/wordpress/src/wp-content/themes/twentysixteen
Processing index.php [PHP => 299 tokens in 61 lines]... DONE in 32ms (2 errors, 0 warnings)
Processing page.php [PHP => 178 tokens in 43 lines]... DONE in 19ms (1 errors, 0 warnings)
Processing search.php [PHP => 283 tokens in 53 lines]... DONE in 31ms (2 errors, 0 warnings)
Processing sidebar-content-bottom.php [PHP => 148 tokens in 29 lines]... DONE in 15ms (2 errors, 0 warnings)
Processing sidebar.php [PHP => 72 tokens in 15 lines]... DONE in 8ms (1 errors, 0 warnings)
Processing single.php [PHP => 269 tokens in 47 lines]... DONE in 29ms (5 errors, 0 warnings)
Changing into directory /tmp/wordpress/src/wp-content/themes/twentysixteen/template-parts
Processing biography.php [PHP => 213 tokens in 37 lines]... DONE in 23ms (2 errors, 0 warnings)
Processing content-none.php [PHP => 232 tokens in 35 lines]... DONE in 23ms (1 errors, 0 warnings)
Processing content-page.php [PHP => 214 tokens in 35 lines]... DONE in 22ms (1 errors, 0 warnings)
Processing content-search.php [PHP => 212 tokens in 37 lines]... DONE in 25ms (1 errors, 0 warnings)
Processing content-single.php [PHP => 288 tokens in 47 lines]... DONE in 30ms (1 errors, 0 warnings)
Processing content.php [PHP => 386 tokens in 53 lines]... DONE in 40ms (2 errors, 0 warnings)

FILE: /tmp/wordpress/src/wp-content/themes/twentysixteen/archive.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 55 | ERROR | [x] Line indented incorrectly; expected at least 3 tabs,
    |       |     found 2 (Generic.WhiteSpace.ScopeIndent.Incorrect)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /tmp/wordpress/src/wp-content/themes/twentysixteen/comments.php
----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
 28 | ERROR | [ ] Expected next thing to be an escaping function (see
    |       |     Codex for 'Data Validation'), not ')'
    |       |     (WordPress.XSS.EscapeOutput.OutputNotEscaped)
 29 | ERROR | [x] Multi-line function call not indented correctly;
    |       |     expected 16 spaces but found 20
    |       |     (PEAR.Functions.FunctionCallSignature.Indent)
 29 | ERROR | [ ] Expected next thing to be an escaping function (see
    |       |     Codex for 'Data Validation'), not ')'
    |       |     (WordPress.XSS.EscapeOutput.OutputNotEscaped)
 51 | ERROR | [x] Line indented incorrectly; expected 1 tabs, found 2
    |       |     (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /tmp/wordpress/src/wp-content/themes/twentysixteen/footer.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
 10 | ERROR | [ ] There must be exactly one blank line after the file
    |       |     comment
    |       |     (Squiz.Commenting.FileComment.SpacingAfterComment)
 21 | ERROR | [x] Each line in an array declaration must end in a
    |       |     comma (WordPress.Arrays.ArrayDeclaration.NoComma)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /tmp/wordpress/src/wp-content/themes/twentysixteen/functions.php
----------------------------------------------------------------------
FOUND 45 ERRORS AFFECTING 37 LINES
----------------------------------------------------------------------
  36 | ERROR | [x] Line indented incorrectly; expected at least 1 tabs,
     |       |     found 0 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  43 | ERROR | [x] Line indented incorrectly; expected 1 tabs, found
     |       |     0 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
  44 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  45 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  46 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  47 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  48 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  49 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  50 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  52 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  53 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  55 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  56 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  57 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  58 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  59 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  60 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  61 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  63 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  64 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  65 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  66 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  67 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  68 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  69 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  71 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  72 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  95 | ERROR | [x] Each value in a multi-line array must be on a new
     |       |     line
     |       |     (WordPress.Arrays.ArrayDeclaration.ValueNoNewline)
  95 | ERROR | [x] Each value in a multi-line array must be on a new
     |       |     line
     |       |     (WordPress.Arrays.ArrayDeclaration.ValueNoNewline)
  95 | ERROR | [x] Each value in a multi-line array must be on a new
     |       |     line
     |       |     (WordPress.Arrays.ArrayDeclaration.ValueNoNewline)
  95 | ERROR | [x] Each value in a multi-line array must be on a new
     |       |     line
     |       |     (WordPress.Arrays.ArrayDeclaration.ValueNoNewline)
  95 | ERROR | [x] Each value in a multi-line array must be on a new
     |       |     line
     |       |     (WordPress.Arrays.ArrayDeclaration.ValueNoNewline)
  95 | ERROR | [x] Each value in a multi-line array must be on a new
     |       |     line
     |       |     (WordPress.Arrays.ArrayDeclaration.ValueNoNewline)
  95 | ERROR | [x] Each value in a multi-line array must be on a new
     |       |     line
     |       |     (WordPress.Arrays.ArrayDeclaration.ValueNoNewline)
  95 | ERROR | [x] Comma required after last value in array
     |       |     declaration
     |       |     (WordPress.Arrays.ArrayDeclaration.NoCommaAfterLast)
 104 | ERROR | [ ] Inline comments must start with a capital letter
     |       |     (Squiz.Commenting.InlineComment.NotCapital)
 104 | ERROR | [ ] Inline comments must end in full-stops, exclamation
     |       |     marks, or question marks
     |       |     (Squiz.Commenting.InlineComment.InvalidEndChar)
 158 | ERROR | [x] Line indented incorrectly; expected at least 1 tabs,
     |       |     found 0 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 165 | ERROR | [x] Line indented incorrectly; expected 1 tabs, found
     |       |     0 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 166 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 167 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 168 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 170 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 171 | ERROR | [x] Line indented incorrectly; expected 2 tabs, found
     |       |     1 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 172 | ERROR | [x] Line indented incorrectly; expected at least 3 tabs,
     |       |     found 2 (Generic.WhiteSpace.ScopeIndent.Incorrect)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 43 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /tmp/wordpress/src/wp-content/themes/twentysixteen/header.php
----------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
----------------------------------------------------------------------
 10 | ERROR | [ ] There must be exactly one blank line after the file
    |       |     comment
    |       |     (Squiz.Commenting.FileComment.SpacingAfterComment)
 36 | ERROR | [x] Line indented incorrectly; expected 0 tabs, found 5
    |       |     (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 37 | ERROR | [ ] Expected next thing to be an escaping function (see
    |       |     Codex for 'Data Validation'), not '$description'
    |       |     (WordPress.XSS.EscapeOutput.OutputNotEscaped)
 52 | ERROR | [x] Each line in an array declaration must end in a
    |       |     comma (WordPress.Arrays.ArrayDeclaration.NoComma)
 66 | ERROR | [x] Each line in an array declaration must end in a
    |       |     comma (WordPress.Arrays.ArrayDeclaration.NoComma)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /tmp/wordpress/src/wp-content/themes/twentysixteen/image.php
----------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
----------------------------------------------------------------------
 17 | ERROR | [x] Line indented incorrectly; expected 3 tabs, found 4
    |       |     (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 75 | ERROR | [x] Line indented incorrectly; expected 6 tabs, found 7
    |       |     (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 89 | ERROR | [ ] Inline comments must end in full-stops, exclamation
    |       |     marks, or question marks
    |       |     (Squiz.Commenting.InlineComment.InvalidEndChar)
 90 | ERROR | [x] Line indented incorrectly; expected 4 tabs, found 5
    |       |     (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 94 | ERROR | [ ] Inline comments must end in full-stops, exclamation
    |       |     marks, or question marks
    |       |     (Squiz.Commenting.InlineComment.InvalidEndChar)
 98 | ERROR | [x] Line indented incorrectly; expected at least 5 tabs,
    |       |     found 4 (Generic.WhiteSpace.ScopeIndent.Incorrect)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...ordpress/src/wp-content/themes/twentysixteen/inc/back-compat.php
----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------
 38 | ERROR | Expected next thing to be an escaping function (see Codex
    |       | for 'Data Validation'), not '$message'
    |       | (WordPress.XSS.EscapeOutput.OutputNotEscaped)
 47 | ERROR | Expected next thing to be an escaping function (see Codex
    |       | for 'Data Validation'), not '$GLOBALS'
    |       | (WordPress.XSS.EscapeOutput.OutputNotEscaped)
 48 | ERROR | Expected next thing to be an escaping function (see Codex
    |       | for 'Data Validation'), not 'true'
    |       | (WordPress.XSS.EscapeOutput.OutputNotEscaped)
 60 | ERROR | Expected next thing to be an escaping function (see Codex
    |       | for 'Data Validation'), not '$GLOBALS'
    |       | (WordPress.XSS.EscapeOutput.OutputNotEscaped)
----------------------------------------------------------------------


FILE: ...dpress/src/wp-content/themes/twentysixteen/inc/custom-header.php
----------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 7 LINES
----------------------------------------------------------------------
 62 | ERROR | [x] Line indented incorrectly; expected at least 1 tabs,
    |       |     found 0 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 69 | ERROR | [x] Line indented incorrectly; expected 1 tabs, found 0
    |       |     (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 70 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
    |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 71 | ERROR | [x] Line indented incorrectly; expected 2 tabs, found 1
    |       |     (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 72 | ERROR | [x] Line indented incorrectly; expected at least 3 tabs,
    |       |     found 2 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 74 | ERROR | [x] Line indented incorrectly; expected at least 3 tabs,
    |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 91 | ERROR | [ ] Inline comments must start with a capital letter
    |       |     (Squiz.Commenting.InlineComment.NotCapital)
 91 | ERROR | [ ] Inline comments must end in full-stops, exclamation
    |       |     marks, or question marks
    |       |     (Squiz.Commenting.InlineComment.InvalidEndChar)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...wordpress/src/wp-content/themes/twentysixteen/inc/customizer.php
----------------------------------------------------------------------
FOUND 26 ERRORS AFFECTING 23 LINES
----------------------------------------------------------------------
 163 | ERROR | [x] Line indented incorrectly; expected at least 1 tabs,
     |       |     found 0 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 170 | ERROR | [x] Line indented incorrectly; expected 1 tabs, found
     |       |     0 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 171 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 172 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 174 | ERROR | [x] Line indented incorrectly; expected 2 tabs, found
     |       |     1 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 175 | ERROR | [x] Line indented incorrectly; expected at least 3 tabs,
     |       |     found 2 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 180 | ERROR | [ ] Inline comments must start with a capital letter
     |       |     (Squiz.Commenting.InlineComment.NotCapital)
 180 | ERROR | [ ] Inline comments must end in full-stops, exclamation
     |       |     marks, or question marks
     |       |     (Squiz.Commenting.InlineComment.InvalidEndChar)
 183 | ERROR | [x] Line indented incorrectly; expected at least 1 tabs,
     |       |     found 0 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 190 | ERROR | [x] Line indented incorrectly; expected 1 tabs, found
     |       |     0 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 191 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 192 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 194 | ERROR | [x] Line indented incorrectly; expected 2 tabs, found
     |       |     1 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 195 | ERROR | [x] Line indented incorrectly; expected at least 3 tabs,
     |       |     found 2 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 200 | ERROR | [ ] Inline comments must start with a capital letter
     |       |     (Squiz.Commenting.InlineComment.NotCapital)
 200 | ERROR | [ ] Inline comments must end in full-stops, exclamation
     |       |     marks, or question marks
     |       |     (Squiz.Commenting.InlineComment.InvalidEndChar)
 204 | ERROR | [x] Line indented incorrectly; expected at least 1 tabs,
     |       |     found 0 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 212 | ERROR | [x] Line indented incorrectly; expected 1 tabs, found
     |       |     0 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 213 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 215 | ERROR | [x] Line indented incorrectly; expected 2 tabs, found
     |       |     1 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 216 | ERROR | [x] Line indented incorrectly; expected at least 3 tabs,
     |       |     found 2 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 221 | ERROR | [ ] Inline comments must start with a capital letter
     |       |     (Squiz.Commenting.InlineComment.NotCapital)
 221 | ERROR | [ ] Inline comments must end in full-stops, exclamation
     |       |     marks, or question marks
     |       |     (Squiz.Commenting.InlineComment.InvalidEndChar)
 244 | ERROR | [x] Space before opening parenthesis of function call
     |       |     prohibited
     |       |     (PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket)
 626 | ERROR | [ ] Expected next thing to be an escaping function (see
     |       |     Codex for 'Data Validation'), not ')'
     |       |     (WordPress.XSS.EscapeOutput.OutputNotEscaped)
 845 | ERROR | [x] Space before opening parenthesis of function call
     |       |     prohibited
     |       |     (PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 19 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...dpress/src/wp-content/themes/twentysixteen/inc/template-tags.php
----------------------------------------------------------------------
FOUND 36 ERRORS AFFECTING 35 LINES
----------------------------------------------------------------------
  13 | ERROR | [x] Line indented incorrectly; expected at least 1 tabs,
     |       |     found 0 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  18 | ERROR | [x] Line indented incorrectly; expected 1 tabs, found
     |       |     0 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
  19 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  20 | ERROR | [x] Line indented incorrectly; expected 2 tabs, found
     |       |     1 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
  23 | ERROR | [ ] Expected next thing to be an escaping function (like
     |       |     esc_html_e() or esc_attr_e()), not '_e'
     |       |     (WordPress.XSS.EscapeOutput.UnsafePrintingFunction)
  26 | ERROR | [x] Line indented incorrectly; expected 3 tabs, found
     |       |     4 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
  27 | ERROR | [ ] Expected next thing to be an escaping function (see
     |       |     Codex for 'Data Validation'), not '$prev_link'
     |       |     (WordPress.XSS.EscapeOutput.OutputNotEscaped)
  31 | ERROR | [ ] Expected next thing to be an escaping function (see
     |       |     Codex for 'Data Validation'), not '$next_link'
     |       |     (WordPress.XSS.EscapeOutput.OutputNotEscaped)
  42 | ERROR | [x] Line indented incorrectly; expected at least 1 tabs,
     |       |     found 0 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  49 | ERROR | [x] Line indented incorrectly; expected 1 tabs, found
     |       |     0 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
  50 | ERROR | [x] Line indented incorrectly; expected 2 tabs, found
     |       |     1 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
  51 | ERROR | [x] Line indented incorrectly; expected at least 3 tabs,
     |       |     found 2 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  52 | ERROR | [x] Line indented incorrectly; expected at least 3 tabs,
     |       |     found 2 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  86 | ERROR | [x] Line indented incorrectly; expected at least 1 tabs,
     |       |     found 0 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  93 | ERROR | [x] Line indented incorrectly; expected 1 tabs, found
     |       |     0 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
  94 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
  96 | ERROR | [x] Line indented incorrectly; expected 2 tabs, found
     |       |     1 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
  97 | ERROR | [x] Line indented incorrectly; expected at least 3 tabs,
     |       |     found 2 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 110 | ERROR | [ ] Expected next thing to be an escaping function (see
     |       |     Codex for 'Data Validation'), not '$time_string'
     |       |     (WordPress.XSS.EscapeOutput.OutputNotEscaped)
 116 | ERROR | [x] Line indented incorrectly; expected at least 1 tabs,
     |       |     found 0 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 123 | ERROR | [x] Line indented incorrectly; expected 1 tabs, found
     |       |     0 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 124 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 125 | ERROR | [x] Line indented incorrectly; expected 2 tabs, found
     |       |     1 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 126 | ERROR | [x] Line indented incorrectly; expected at least 3 tabs,
     |       |     found 2 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 128 | ERROR | [ ] Expected next thing to be an escaping function (see
     |       |     Codex for 'Data Validation'), not '$categories_list'
     |       |     (WordPress.XSS.EscapeOutput.OutputNotEscaped)
 136 | ERROR | [ ] Expected next thing to be an escaping function (see
     |       |     Codex for 'Data Validation'), not '$tags_list'
     |       |     (WordPress.XSS.EscapeOutput.OutputNotEscaped)
 143 | ERROR | [x] Line indented incorrectly; expected at least 1 tabs,
     |       |     found 0 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 151 | ERROR | [x] Line indented incorrectly; expected 1 tabs, found
     |       |     0 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 152 | ERROR | [x] Line indented incorrectly; expected 2 tabs, found
     |       |     1 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 153 | ERROR | [x] Line indented incorrectly; expected at least 3 tabs,
     |       |     found 2 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 169 | ERROR | [ ] Inline comments must end in full-stops, exclamation
     |       |     marks, or question marks
     |       |     (Squiz.Commenting.InlineComment.InvalidEndChar)
 174 | ERROR | [x] Line indented incorrectly; expected at least 1 tabs,
     |       |     found 0 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 174 | ERROR | [ ] Doc comment for parameter "$more" missing
     |       |     (Squiz.Commenting.FunctionComment.MissingParamTag)
 181 | ERROR | [x] Line indented incorrectly; expected 1 tabs, found
     |       |     0 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
 182 | ERROR | [x] Line indented incorrectly; expected at least 2 tabs,
     |       |     found 1 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 186 | ERROR | [x] Multi-line function call not indented correctly;
     |       |     expected 4 spaces but found 8
     |       |     (PEAR.Functions.FunctionCallSignature.Indent)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 28 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /tmp/wordpress/src/wp-content/themes/twentysixteen/index.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
 40 | ERROR | [x] Line indented incorrectly; expected at least 4 tabs,
    |       |     found 3 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 50 | ERROR | [x] Line indented incorrectly; expected at least 3 tabs,
    |       |     found 2 (Generic.WhiteSpace.ScopeIndent.Incorrect)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /tmp/wordpress/src/wp-content/themes/twentysixteen/page.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 32 | ERROR | [x] Line indented incorrectly; expected at least 4 tabs,
    |       |     found 3 (Generic.WhiteSpace.ScopeIndent.Incorrect)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /tmp/wordpress/src/wp-content/themes/twentysixteen/search.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
 32 | ERROR | [x] Line indented incorrectly; expected at least 4 tabs,
    |       |     found 3 (Generic.WhiteSpace.ScopeIndent.Incorrect)
 42 | ERROR | [x] Line indented incorrectly; expected at least 3 tabs,
    |       |     found 2 (Generic.WhiteSpace.ScopeIndent.Incorrect)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...s/src/wp-content/themes/twentysixteen/sidebar-content-bottom.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
  8 | ERROR | [ ] There must be exactly one blank line after the file
    |       |     comment
    |       |     (Squiz.Commenting.FileComment.SpacingAfterComment)
 12 | ERROR | [x] Inline control structures are not allowed
    |       |     (Generic.ControlStructures.InlineControlStructure.NotAllowed)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /tmp/wordpress/src/wp-content/themes/twentysixteen/sidebar.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 8 | ERROR | There must be exactly one blank line after the file
   |       | comment (Squiz.Commenting.FileComment.SpacingAfterComment)
----------------------------------------------------------------------


FILE: /tmp/wordpress/src/wp-content/themes/twentysixteen/single.php
----------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
----------------------------------------------------------------------
 28 | ERROR | [ ] String concat is not required here; use a single string
    |       |     instead (Generic.Strings.UnnecessaryStringConcat.Found)
 29 | ERROR | [ ] String concat is not required here; use a single string
    |       |     instead (Generic.Strings.UnnecessaryStringConcat.Found)
 31 | ERROR | [ ] String concat is not required here; use a single string
    |       |     instead (Generic.Strings.UnnecessaryStringConcat.Found)
 32 | ERROR | [ ] String concat is not required here; use a single string
    |       |     instead (Generic.Strings.UnnecessaryStringConcat.Found)
 36 | ERROR | [x] Line indented incorrectly; expected at least 3 tabs,
    |       |     found 2 (Generic.WhiteSpace.ScopeIndent.Incorrect)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...src/wp-content/themes/twentysixteen/template-parts/biography.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
  8 | ERROR | There must be exactly one blank line after the file
    |       | comment (Squiz.Commenting.FileComment.SpacingAfterComment)
 28 | ERROR | Expected next thing to be an escaping function (like
    |       | esc_html_e() or esc_attr_e()), not '_e'
    |       | (WordPress.XSS.EscapeOutput.UnsafePrintingFunction)
----------------------------------------------------------------------


FILE: .../wp-content/themes/twentysixteen/template-parts/content-none.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 10 | ERROR | There must be exactly one blank line after the file
    |       | comment (Squiz.Commenting.FileComment.SpacingAfterComment)
----------------------------------------------------------------------


FILE: .../wp-content/themes/twentysixteen/template-parts/content-page.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 8 | ERROR | There must be exactly one blank line after the file
   |       | comment (Squiz.Commenting.FileComment.SpacingAfterComment)
----------------------------------------------------------------------


FILE: ...p-content/themes/twentysixteen/template-parts/content-search.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 10 | ERROR | There must be exactly one blank line after the file
    |       | comment (Squiz.Commenting.FileComment.SpacingAfterComment)
----------------------------------------------------------------------


FILE: ...p-content/themes/twentysixteen/template-parts/content-single.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 8 | ERROR | There must be exactly one blank line after the file
   |       | comment (Squiz.Commenting.FileComment.SpacingAfterComment)
----------------------------------------------------------------------


FILE: ...s/src/wp-content/themes/twentysixteen/template-parts/content.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
  8 | ERROR | [ ] There must be exactly one blank line after the file
    |       |     comment
    |       |     (Squiz.Commenting.FileComment.SpacingAfterComment)
 14 | ERROR | [x] Line indented incorrectly; expected 2 tabs, found 3
    |       |     (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Time: 1.51 secs; Memory: 18.5Mb


The command "$WP_DEVELOP_DIR/php-codesniffer/scripts/phpcs -p -s -v -n . --standard=./codesniffer.ruleset.xml --extensions=php" exited with 1.

Done. Your build exited with 1.
# aliased to a recent 5.3.x version
- "5.3"
# Current $required_php_version for WordPress: 5.2.4
- "5.2"

This comment has been minimized.

@aaronjorbin

aaronjorbin Aug 29, 2015
Member

5.6 and 7 should also be tested.

# WordPress 4.3
# @link https://github.com/WordPress/WordPress/tree/4.3-branch
- WP_VERSION=4.3 WP_MULTISITE=0
- WP_VERSION=4.3 WP_MULTISITE=1

This comment has been minimized.

@aaronjorbin

aaronjorbin Aug 29, 2015
Member

I don't see a reason to test old versions of WordPress. The default theme should have a minimum version of the version it is released on

This comment has been minimized.

@philiparthurmoore

philiparthurmoore Aug 30, 2015
Author Contributor

The default theme should have a minimum version of the version it is released on

Minimum required version for Twenty Sixteen is 4.2.

I doubt this testing matrix even matters since all we're doing is running the theme through Coding Standards, right now at least. Happy to make any adjustments after discussion during this week's meeting.

@karmatosed
Copy link
Member

@karmatosed karmatosed commented Aug 30, 2015

For future reference, as this needs discussion, I would have suggested an issue would have been great to create. I've tagged it for discussion as should be brought up in the weekly meeting. We have to consider the packaging implications of having this in root.

@philiparthurmoore
Copy link
Contributor Author

@philiparthurmoore philiparthurmoore commented Aug 30, 2015

Very easy to ignore from packaging via gitattributes. Super-simple.

Happy to chat through it during the first meeting.
On Aug 30, 2015 7:56 AM, "Tammie Lister" notifications@github.com wrote:

For future reference, as this needs discussion, I would have suggested an
issue would have been great to create. I've tagged it for discussion as
should be brought up in the weekly meeting. We have to consider the
packaging implications of having this in root.


Reply to this email directly or view it on GitHub
#23 (comment)
.

<description>A custom set of code standard rules to check for WordPress themes.</description>

<!-- Include the WordPress ruleset, with exclusions. -->
<rule ref="WordPress">

This comment has been minimized.

@westonruter

westonruter Aug 31, 2015
Member

@philiparthurmoore this should be WordPress-Core instead, as WordPress is a superset of all the standards and it has a lot of extras that wouldn't be applicable.

There's also, actually, a WordPress-Docs standard now too which can be used to check for PhpDoc comments.

So I think this should be replaced with:

<rule ref="WordPress-Core" />
<rule ref="WordPress-Docs" />
# Install CodeSniffer for WordPress Coding Standards checks.
- git clone https://github.com/squizlabs/PHP_CodeSniffer.git php-codesniffer
# Install WordPress Coding Standards.
- git clone https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git wordpress-coding-standards

This comment has been minimized.

@westonruter

westonruter Aug 31, 2015
Member

@philiparthurmoore since develop is set to be the default branch for WordPress-Coding-Standards, this should probably clone explicitly checking out master for the latest stable release.

git clone -b master https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git wordpress-coding-standards

Also, you could get a speed boost by grabbing the tarball instead:

mkdir wordpress-coding-standards && curl -L https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/archive/master.tar.gz | tar xz --strip-components=1 -C wordpress-coding-standards

/via https://github.com/xwp/wp-dev-lib/blob/3a17a561580ef73bc63466ab62893535ebad0666/travis.before_script.sh#L52

# Hop into themes directory.
- cd $theme_dir
# After CodeSniffer install you should refresh your path.
- phpenv rehash

This comment has been minimized.

@westonruter

westonruter Aug 31, 2015
Member

Also can install JSHint and JSCS:

- npm install -g jscs
- npm install -g jshint

This comment has been minimized.

@westonruter

westonruter Aug 31, 2015
Member

And grab the Core JSHint file:

- wget https://develop.svn.wordpress.org/trunk/.jshintrc
# -n flag: Do not print warnings. (shortcut for --warning-severity=0)
# --standard: Use WordPress as the standard.
# --extensions: Only sniff PHP files.
- $WP_DEVELOP_DIR/php-codesniffer/scripts/phpcs -p -s -v -n . --standard=./codesniffer.ruleset.xml --extensions=php

This comment has been minimized.

@westonruter

westonruter Aug 31, 2015
Member

This can also add JSHint and JSCS checks:

- jshint .
- jscs --preset wordpress $( find . -name '*.js' )
@philiparthurmoore
Copy link
Contributor Author

@philiparthurmoore philiparthurmoore commented Sep 9, 2015

Closing in favor of #140.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.