Bug 125341 - Remove function from style/checkers/cpp.py
Summary: Remove function from style/checkers/cpp.py
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-06 01:26 PST by Tamas Gergely
Modified: 2013-12-06 10:57 PST (History)
5 users (show)

See Also:


Attachments
patch removes a function (3.38 KB, patch)
2013-12-06 01:55 PST, Tamas Gergely
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tamas Gergely 2013-12-06 01:26:31 PST
There is a FIXME: to remove process_file_data from style/checkers/cpp.py.
Comment 1 Tamas Gergely 2013-12-06 01:55:10 PST
Created attachment 218579 [details]
patch removes a function

I have simply split the functionality of process_file_data into two parts: the checker is now created directly in the CppStyleTestBase unit test, while setting the module's global _unit_test_config is done from the constructor of CppChecker.
Although currently it causes no problem, I think that setting the global from the constructor is not a nice nor safe solution. What could be done are:
- move the global into the CppChecker class and propagate its value (through 3 functions) to the only place it is used (the 3 functions are used nowhere else), or
- move all the functions (or almost all) into the CppChecker class, or
- leave it as it is now.
By the way, to set up some specific environments, the cpp_unittest uses both globals and parameter propagation. Is one of them preferred?
Comment 2 WebKit Commit Bot 2013-12-06 10:54:45 PST
Comment on attachment 218579 [details]
patch removes a function

Clearing flags on attachment: 218579

Committed r160230: <http://trac.webkit.org/changeset/160230>
Comment 3 WebKit Commit Bot 2013-12-06 10:57:50 PST
All reviewed patches have been landed.  Closing bug.