Bug 80835 - Style checker complains about naming parameter with default values
Summary: Style checker complains about naming parameter with default values
Status: RESOLVED INVALID
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:
: 105831 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-12 07:26 PDT by Antonio Gomes
Modified: 2012-12-28 08:34 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Gomes 2012-03-12 07:26:16 PDT
It happened in https://bugs.webkit.org/show_bug.cgi?id=79611#c4

Code looks like this:

- void calculateScrollbarModesForLayout(ScrollbarMode& hMode, ScrollbarMode& vMode);
+ void calculateScrollbarModesForLayout(ScrollbarMode& hMode, ScrollbarMode& vMode, ScrollbarModesCalculationStrategy strategy = AnyRule);

and the code style checker complained that 'strategy' added not value:

>> Source/WebCore/page/FrameView.h:283:  The parameter name "strategy" adds no information, so it should be removed.  [readability/parameter_name] [5]

However it is needed, given the default value.
Comment 1 Alexey Proskuryakov 2012-03-12 10:04:33 PDT
Actually, this should work:

+ void calculateScrollbarModesForLayout(ScrollbarMode& hMode, ScrollbarMode& vMode, ScrollbarModesCalculationStrategy = AnyRule);
Comment 2 Antonio Gomes 2012-03-12 10:24:39 PDT
(In reply to comment #1)
> Actually, this should work:
> 
> + void calculateScrollbarModesForLayout(ScrollbarMode& hMode, ScrollbarMode& vMode, ScrollbarModesCalculationStrategy = AnyRule);

oh thanks, so this is INVALID.
Comment 3 David Levin 2012-12-28 08:34:33 PST
*** Bug 105831 has been marked as a duplicate of this bug. ***