Bug 51103

Summary: check-webkit-style should check for XML syntax errors in .vcproj/.vsprops files
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: Tools / TestsAssignee: Adam Roben (:aroben) <aroben>
Status: RESOLVED FIXED    
Severity: Normal CC: cjerdonek, ddkilzer, eric, hamaji, levin, ojan, sfalken
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 51139    
Attachments:
Description Flags
Teach check-webkit-style to check .vcproj and .vsprops files for XML syntax errors levin: review+

Adam Roben (:aroben)
Reported 2010-12-15 04:54:28 PST
It's a pretty common mistake for people to introduce XML syntax errors into .vcproj/.vsprops when editing them by hand (see bug 51029 comment 3 for some examples). It would be great if check-webkit-style could catch these errors!
Attachments
Teach check-webkit-style to check .vcproj and .vsprops files for XML syntax errors (17.76 KB, patch)
2010-12-15 08:18 PST, Adam Roben (:aroben)
levin: review+
David Levin
Comment 1 2010-12-15 06:54:19 PST
Sounds like you want a new checker. Here's how to do that: 1. Add a new checker a. Create a file WebKitTools/Scripts/webkitpy/style/checkers/vc_proj.py b. Fill in the checker to do what you want. i. Use WebKitTools/Scripts/webkitpy/style/checkers/text.py as a simple example. ii. Name it something like VcProjChecker c. Create a simple unit test for it. ?(WebKitTools/Scripts/webkitpy/style/checkers/text_unittest.py is a nice example) 2. You need to teach the style checker about the new file type: a. In WebKitTools/Scripts/webkitpy/style/checker.py Add a new file type to class FileType: Something like VCPROJ b. Make CheckerDispatcher._file_type return this file type for vcproj/vsprops files. c. Make CheckerDispatcher._create_checker return your new checker: VCProjChecker 3. Enjoy the fact that these error will be caught automatically.
Adam Roben (:aroben)
Comment 2 2010-12-15 08:18:37 PST
Created attachment 76648 [details] Teach check-webkit-style to check .vcproj and .vsprops files for XML syntax errors
David Levin
Comment 3 2010-12-15 14:12:10 PST
Comment on attachment 76648 [details] Teach check-webkit-style to check .vcproj and .vsprops files for XML syntax errors Excellent!
Adam Roben (:aroben)
Comment 4 2010-12-15 15:33:57 PST
Ojan Vafai
Comment 5 2010-12-15 15:59:58 PST
David Levin
Comment 6 2010-12-15 16:18:55 PST
Ojan something went wrong here.... Was it the commit queue or something done by hand, etc.?
Ojan Vafai
Comment 7 2010-12-15 17:00:28 PST
(In reply to comment #6) > Ojan something went wrong here.... Was it the commit queue or something done by hand, etc.? It was webkit-patch. This is the age-old problem of webkit-patch doing the wrong thing if the new changelog entry is not at the top. Alterately, the bug is with resolve-ChangeLogs, which did not put the changelog entry at the top when I synced.
Eric Seidel (no email)
Comment 8 2010-12-15 17:08:39 PST
Eric Seidel (no email)
Comment 9 2010-12-16 14:09:31 PST
This caused a python warning when running the tests under python 2.6 Something about BaseException.message being deprecated.
David Levin
Comment 10 2010-12-16 14:11:33 PST
(In reply to comment #9) > This caused a python warning when running the tests under python 2.6 > > Something about BaseException.message being deprecated. Fix is here https://bugs.webkit.org/show_bug.cgi?id=51210
Note You need to log in before you can comment on or make changes to this bug.