Bug 51029 - Would like a pre-commit hook that checks for well-formedness of .vcproj/.vsprops XML files
Summary: Would like a pre-commit hook that checks for well-formedness of .vcproj/.vspr...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-14 05:14 PST by Adam Roben (:aroben)
Modified: 2015-12-07 10:08 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2010-12-14 05:14:19 PST
It's very common for people to introduce XML syntax errors when manually editing .vcproj/.vsprops files (see, e.g., <http://trac.webkit.org/changeset/73914> and <http://trac.webkit.org/changeset/73921>). It would be nice to have a pre-commit hook that would check that these files are well-formed. Steve suggested using `xmllint --noout`.
Comment 1 Alexey Proskuryakov 2010-12-14 11:30:30 PST
Maybe this could be as early as svn-create-patch and/or style checker, in addition to commit hook.
Comment 2 William Siegrist 2010-12-14 15:25:42 PST
This is possible, but is a pre-commit hook the right solution? If we wanted pre-commit hooks to verify our syntax, why not have a tool that lints xml as well as C++, Python, IDL, etc.  In other words, why does XML linting need to block commits but not C++?
Comment 3 Steve Falkenburg 2010-12-14 16:25:07 PST
Here are some recent build fixes required after incorrect edits to WebCore.vcproj that would have been caught by an XML well-formedness check:

http://trac.webkit.org/changeset/73887/trunk/WebCore/WebCore.vcproj/WebCore.vcproj
http://trac.webkit.org/changeset/73773/trunk/WebCore/WebCore.vcproj/WebCore.vcproj
http://trac.webkit.org/changeset/72795/trunk/WebCore/WebCore.vcproj/WebCore.vcproj

Adding this to the style checker might be an ok place to start.
This seems worse than a simple lint or style issue since these aren't stylistic problems (they're fatal errors).
Not sure where the line is between pre-commit hook and style checker. We check for tabs in pre-commit hook for example.
Comment 4 Adam Roben (:aroben) 2010-12-15 04:54:50 PST
Let's start with making check-webkit-style catch these errors, and then see if more is needed. I filed bug 51103.