Summary: | check-webkit-style should check for XML syntax errors in .vcproj/.vsprops files | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Adam Roben (:aroben) <aroben> | ||||
Component: | Tools / Tests | Assignee: | 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
Adam Roben (:aroben)
2010-12-15 04:54:28 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. Created attachment 76648 [details]
Teach check-webkit-style to check .vcproj and .vsprops files for XML syntax errors
Comment on attachment 76648 [details]
Teach check-webkit-style to check .vcproj and .vsprops files for XML syntax errors
Excellent!
Committed r74149: <http://trac.webkit.org/changeset/74149> Committed r74158: <http://trac.webkit.org/changeset/74158> Ojan something went wrong here.... Was it the commit queue or something done by hand, etc.? (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. This caused a python warning when running the tests under python 2.6 Something about BaseException.message being deprecated. (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 |