Last modified: 2010-07-26 17:11:04 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 24543 - Commit hook for syntax checking
Commit hook for syntax checking
Status: RESOLVED DUPLICATE of bug 20069
Product: Wikimedia
Classification: Unclassified
Subversion (Other open bugs)
All All
: Normal enhancement (vote)
: ---
Assigned To: Rob Halsell
Depends on:
  Show dependency treegraph
Reported: 2010-07-26 07:11 UTC by Sam Reed (reedy)
Modified: 2010-07-26 17:11 UTC (History)
2 users (show)

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


Description Sam Reed (reedy) 2010-07-26 07:11:49 UTC
Many of us have probably done this at some point or another - Where we've committed without pressing save again, or a typo in a variable.

Meaning we need a followup commit

r69921 and then r69930 to fix it, for example

Any chance of a hook to just literally do a syntax/sanity check of the commited code, aborting the commit if it doesn't check out?
Comment 1 Max Semenik 2010-07-26 13:25:43 UTC
For the reference: there is maintenace/checkSyntax.php which checks not only for syntax errors, but also for other common problems, such as BOM's. When run on working copy with --modified switch, it will check quickly only modified files. It's mentioned at <>, but that page is not advertised enough.
Comment 2 Chad H. 2010-07-26 16:59:38 UTC
Pre-commit? Ugh...

For the same reasons as bug 21211, this would be annoying. Not opposed to the idea in concept, but it needs some fleshing out.

Perhaps if we can come up with a non-blocking way to do hooks first.
Comment 3 Max Semenik 2010-07-26 17:11:04 UTC

*** This bug has been marked as a duplicate of bug 20069 ***

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