User tests: Successful: Unsuccessful:
This pull adds the PHP script that @mbabker did for com_localise in Joomla repo. This script is run by travis and it will do:
# When issues are detected Travis will fail
exit(1);
# When no issues Travis will succed
exit(0);
If we are able to get rid of all the current code style issues in the CMS we will be able to merge this pull request and it will automatically check new Pull request failing when a code style issue is added.
Labels |
Added:
?
|
But how would the standard PHPcs make travis fail is doing an exit(1)?
Yes, see this build - https://travis-ci.org/joomla/joomla-cms/jobs/37685677
mmm, nice!
The benefit that I see with your Travis script is that you can do this specific ignores https://github.com/joomla/joomla-cms/pull/4528/files#diff-f1ccca0df89d1caecd8e66935074f7b7R30
How do you do that with the current script?
You just use the --ignore
switch. So in the .travis.yml file we'd use something like phpcs --report=full --extensions=php -p --standard=build/phpcs/Joomla --ignore=administrator/components/*/views/*/tmpl/*,components/*/views/*/tmpl/*,layouts/* .
Ok, super! closing this one.
Title |
|
||||||
Status | Pending | ⇒ | Closed | ||||
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-10-11 17:18:57 |
If any change to do in com_localise, please do. The amount of errors we get is enormous and some are useless.
Ironically, the PHPCS checks have been working just fine since adding them into Travis, including failing the build. I don't think we'll need this script here, and could probably remove it in the com_localise repo and just use a standard PHPCS call.