Last modified: 2012-12-15 10:10:18 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 T22069, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 20069 - Implement PHP syntax validity (as SVN post commit hook)
Implement PHP syntax validity (as SVN post commit hook)
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
CodeReview (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 24543 (view as bug list)
Depends on: 25940
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-05 00:14 UTC by Brion Vibber
Modified: 2012-12-15 10:10 UTC (History)
7 users (show)

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


Attachments

Description Brion Vibber 2009-08-05 00:14:54 UTC
Should check modified *.php and *.inc files on checkin with php -l and upload the results to CodeReview as test cases.

See current structure around parser tests in tools/checkin-test-trigger; need a standalone script to upload results in the proper format w/o the internal MW deps that parserTests' function requires.
Comment 1 Aaron Schulz 2009-08-11 21:03:38 UTC
Hmm, can this be done with a pre-commit svn hook?
Comment 2 Max Semenik 2009-11-24 20:35:57 UTC
Note: checkSyntax.php had been recently tweaked to be actually usable for such checks. It can now be run with --list-file option that allows to specify the list of files to check, instead of checking whole core (or even funnier, extensions).
Comment 3 Max Semenik 2010-07-26 17:11:04 UTC
*** Bug 24543 has been marked as a duplicate of this bug. ***
Comment 4 Sam Reed (reedy) 2010-11-15 21:49:22 UTC
Retitling and adding dependancy

Post commit hook, pinging CR and setting fixme would be great
Comment 5 Sam Reed (reedy) 2010-11-17 20:05:07 UTC
As a thing to this, we shouldn't blame users for syntax errors if they already exist on the file pre commit...
Comment 6 Sam Reed (reedy) 2010-12-05 14:45:45 UTC
Any idea what we should do with this now, as we've got php -l pre commit?
Comment 7 Platonides 2010-12-05 15:31:51 UTC
Comment #5 is trivially fixed by ensuring we have no files with syntax errors.

We no longer have anyone in the whole trunk. There used to be one added on purpose in NamespaceCompat.php but it was removed in r70693.

find \( -name \*.php -or -name \*.inc \) -exec php -l \{\} \; | grep -v "No syntax errors detected"
Comment 8 Roan Kattouw 2010-12-07 16:10:11 UTC
(In reply to comment #7)
> find \( -name \*.php -or -name \*.inc \) -exec php -l \{\} \; | grep -v "No
> syntax errors detected"
I branched REL1_17 today, which caused the pre-commit hook to syntax-check a full copy of /trunk/phase3 and /trunk/extensions , which succeeded.
Comment 9 Max Semenik 2012-12-15 10:10:18 UTC
RIP CodeReview.

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


Navigation
Links