This bug is to discuss command-line parsing for the 'webkit-file' utility: syntax and implementation
Created attachment 134781 [details] patch, requires 64149, 61773 and 82595 initial version of the webkit-file tool. Remaining things to do that I would prefer to do in follow-up patches: .) Change to use Python logging module .) Simplify ID handling in various classes .) Move more code into base classes (but this requires working on the remaining platforms first)
Addendum: the size of the patch is largely due to unittest data files, not so much code per se.
Created attachment 134788 [details] patch, requires 64149, 61773 and 82595 Removing unnecessary data file - the .cpp and .h files are also probably not actually required, but I left them in for the time being.
Comment on attachment 134788 [details] patch, requires 64149, 61773 and 82595 View in context: https://bugs.webkit.org/attachment.cgi?id=134788&action=review For now I just commented on test files. > Tools/ChangeLog:11 > + * Scripts/webkit-file: Added. Please explain what each file is for. > Tools/ChangeLog:49 > + * Scripts/webkitpy/common/project/unittest_files/CMake-unsorted.txt: Added. > + * Scripts/webkitpy/common/project/unittest_files/Qt-add-file.pro: Added. > + * Scripts/webkitpy/common/project/unittest_files/Qt-sort.pro: Added. > + * Scripts/webkitpy/common/project/unittest_files/Qt-unsorted.pri: Added. > + * Scripts/webkitpy/common/project/unittest_files/Qt-unsorted.pro: Added. > + * Scripts/webkitpy/common/project/unittest_files/Xcode-add-file.pbxproj: Added. > + * Scripts/webkitpy/common/project/unittest_files/Xcode-sort.pbxproj: Added. > + * Scripts/webkitpy/common/project/unittest_files/Xcode-sorted.pbxproj: Added. > + * Scripts/webkitpy/common/project/unittest_files/Xcode-unsorted.pbxproj: Added. > + * Scripts/webkitpy/common/project/unittest_files/Xcode-unsorted.xcodeproj/project.pbxproj: Added. > + * Scripts/webkitpy/common/project/unittest_files/test-project/existing-in-folder.cpp: Added. > + * Scripts/webkitpy/common/project/unittest_files/test-project/existing-in-folder.h: Added. > + * Scripts/webkitpy/common/project/unittest_files/test-project/existing.cpp: Added. > + * Scripts/webkitpy/common/project/unittest_files/test-project/existing.h: Added. > + * Scripts/webkitpy/common/project/unittest_files/test-project/subfolder/existing-in-dir.cpp: Added. > + * Scripts/webkitpy/common/project/unittest_files/test-project/subfolder/existing-in-dir.h: Added. > + * Scripts/webkitpy/common/project/unittest_files/test-target-Info.plist: Added. - What does -sort.*, -unsorted.* and -add-file.* represent? - Why doesn't IDL files appear in these test files other than CMake-unsorted.txt? > Tools/Scripts/webkitpy/common/project/options.py:189 > - self._verbosity = CommonOptions.VERBOSITY_VERY_VERBOSE > + self._verbosity = CommonOptions.VERBOSITY_DEBUG Nit: What is the change for? > Tools/Scripts/webkit-file:41 > + #webcore_setup = WebCoreDebugSetup() Nit: Remove this line. > Tools/Scripts/webkitpy/common/project/unittest_files/CMake-unsorted.txt:31 > + LIST(APPEND WebCore_SOURCES The corresponding ')' is missing. > Tools/Scripts/webkitpy/common/project/unittest_files/CMake-unsorted.txt:39 > + LIST(APPEND WebCore_SOURCES Ditto. > Tools/Scripts/webkitpy/common/project/unittest_files/CMake-unsorted.txt:44 > +LIST(APPEND WebCore_SOURCES Ditto. > Tools/Scripts/webkitpy/common/project/unittest_files/CMake-unsorted.txt:50 > +SET(WebCore_HEADERS Ditto. > Tools/Scripts/webkitpy/common/project/unittest_files/CMake-unsorted.txt:59 > + LIST(APPEND WebCore_HEADERS Ditto. > Tools/Scripts/webkitpy/common/project/unittest_files/CMake-unsorted.txt:66 > + LIST(APPEND WebCore_HEADERS Ditto. > Tools/Scripts/webkitpy/common/project/unittest_files/CMake-unsorted.txt:73 > +LIST(APPEND WebCore_HEADERS Ditto. > Tools/Scripts/webkitpy/common/project/unittest_files/CMake-unsorted.txt:82 > + LIST(APPEND WebCore_HEADERS Ditto. > Tools/Scripts/webkitpy/common/project/unittest_files/CMake-unsorted.txt:85 > + LIST(APPEND WebCore_SOURCES Ditto. > Tools/Scripts/webkitpy/common/project/unittest_files/test-project/existing-in-folder.h:36 > + > + Nit: Remove extra empty lines. > Tools/Scripts/webkitpy/common/project/unittest_files/test-project/existing.cpp:32 > + Ditto. > Tools/Scripts/webkitpy/common/project/unittest_files/test-project/existing.h:36 > + > + Ditto. > Tools/Scripts/webkitpy/common/project/unittest_files/test-project/subfolder/existing-in-dir.cpp:32 > + Ditto. > Tools/Scripts/webkitpy/common/project/unittest_files/test-project/subfolder/existing-in-dir.h:36 > + > + Ditto. > Tools/Scripts/webkitpy/common/project/unittest_files/test-target-Info.plist:18 > + <string>????</string> (I am not sure what it is but) is '????' expected?