Bug 53509 - Modify the style check script to allow parameter names if they share the same type
Summary: Modify the style check script to allow parameter names if they share the same...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-01 10:17 PST by Zhenyao Mo
Modified: 2011-02-01 10:21 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zhenyao Mo 2011-02-01 10:17:10 PST
For example, 

void function(size_t size, size_t stride);

then it should be ok to leave the "size" in the function signature.
Comment 1 David Levin 2011-02-01 10:21:27 PST
Some tips:

The file to modify is Tools/Scripts/webkitpy/style/checkers/cpp.py The function which loops over the variables and does the check is check_function_definition. Right now _check_parameter_name_against_text is the function which does the error message on a per parameter basis, but that will have to change to do this fix.

The unit test is in Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py Look for the function test_parameter_names