Last modified: 2012-06-21 19:16:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T39788, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 37788 - php-lint Jenkins target fails to detect PHP errors
php-lint Jenkins target fails to detect PHP errors
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Continuous integration (Other open bugs)
unspecified
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-21 16:37 UTC by Dereckson
Modified: 2012-06-21 19:16 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Dereckson 2012-06-21 16:37:31 UTC
In https://gerrit.wikimedia.org/r/9979 the patch set #5 (9c0bbdd8ae73f7fc9088ec47db5a3913bc79f7ff) contained a PHP syntax error:

/home/dereckson/dev/mediawiki/www ] php -l languages/messages/MessagesQqq.php
PHP Parse error:  syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in languages/messages/MessagesQqq.php on line 4304

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in languages/messages/MessagesQqq.php on line 4304
Errors parsing languages/messages/MessagesQqq.php

But Jenkins test were fine at https://integration.mediawiki.org/ci/job/MediaWiki-Universal-Linter/1885/console:

(...)
16:23:44  git-files-changed:
(...)
16:23:44       [echo] languages/messages/MessagesQqq.php
(...)
16:23:44  php-lint:
16:23:44       [echo] Blindly running `php -l` on all modified files
16:23:44  
16:23:44  BUILD SUCCESSFUL
Comment 1 Antoine "hashar" Musso (WMF) 2012-06-21 17:06:19 UTC
Probably something trivial but need to be fixed quickly.
Comment 2 Antoine "hashar" Musso (WMF) 2012-06-21 17:08:40 UTC
Example build https://integration.mediawiki.org/ci/job/MediaWiki-Universal-Linter/1886/console
Comment 3 Antoine "hashar" Musso (WMF) 2012-06-21 17:13:03 UTC
made ant to use -verbose which might give us a bit more output.
Comment 4 Antoine "hashar" Musso (WMF) 2012-06-21 19:10:25 UTC
Looks like some single quotes, used  argument passed to grep, are causing grep to fail :-(
 https://gerrit.wikimedia.org/r/12460
Comment 5 Antoine "hashar" Musso (WMF) 2012-06-21 19:16:41 UTC
I used https://gerrit.wikimedia.org/r/12421 as a test box. It submits two faulty PHP files. End result is Jenkins is indeed a failure:

19:12:37  git-files-changed:
19:12:37       [echo] Files changed according to git:
19:12:37       [echo] faulty.php
19:12:37  
19:12:37  php-lint:
19:12:37       [echo] Blindly running `php -l` on modified PHP files:
19:12:37      [apply] PHP Parse error:  syntax error, unexpected T_STRING in faulty.php on line 3
19:12:37      [apply] Errors parsing faulty.php
19:12:37  
19:12:37  BUILD FAILED


I have then amended the change to fix the fault file:

19:15:26  git-files-changed:
19:15:26       [echo] Files changed according to git:
19:15:26       [echo] faulty.php
19:15:26  
19:15:26  php-lint:
19:15:26       [echo] Blindly running `php -l` on modified PHP files:
19:15:26      [apply] No syntax errors detected in faulty.php
19:15:26      [apply] Applied php to 1 file and 0 directories.
19:15:26

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links