From b7e7c165ffd19943f01d1afeb93cc3e15474ef4b Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Thu, 27 Sep 2012 09:35:17 +1200 Subject: [PATCH] NEW Amend Travis build to run a simple PHP_CodeSniffer test. At this stage, the test just checks line-length and line-endings, but previous commits have ensured that framework actually passes those tests. We can add more tests as we actually correct the code to pass those tests, and grow the test suite, as we had for unit tests. --- .travis.yml | 3 +++ tests/phpcs/ruleset.xml | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 tests/phpcs/ruleset.xml diff --git a/.travis.yml b/.travis.yml index c7df1e309..e4d835d3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,11 +15,14 @@ matrix: env: TESTDB=SQLITE before_script: + - pear install pear/PHP_CodeSniffer + - phpenv rehash - ./tests/travis/before_script ~/builds/ss - cd ~/builds/ss script: - phpunit -c phpunit.xml.dist + - phpcs --encoding=utf-8 --tab-width=4 --standard=framework/tests/phpcs -np framework notifications: irc: diff --git a/tests/phpcs/ruleset.xml b/tests/phpcs/ruleset.xml new file mode 100644 index 000000000..7d70c93cd --- /dev/null +++ b/tests/phpcs/ruleset.xml @@ -0,0 +1,38 @@ + + + CodeSniffer ruleset for SilverStripe coding conventions. + + + */css/* + css/* + + + thirdparty/* + */jquery-changetracker/* + parsers/HTML/BBCodeParser/* + + + */SSTemplateParser.php$ + + + 8 + + + + + + + + 7 + + + 8 + + + + + + + + +