Bug 33724

Summary: check-webkit-style: Misses variables that contain underscores.
Product: WebKit Reporter: Daniel Bates <dbates>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric, hamaji
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch v1 none

Description Daniel Bates 2010-01-15 10:54:02 PST
Notice, the file WebCore/rendering/style/SVGRenderStyle.h <http://trac.webkit.org/browser/trunk/WebCore/rendering/style/SVGRenderStyle.h?rev=53300> contains various structs who field names contain an underscore.

Run check-webkit-style on file WebCore/rendering/style/SVGRenderStyle.h.

It catches NonInheritedFlags::_niflags and outputs the following error:

WebCore/rendering/style/SVGRenderStyle.h:167:  _niflags is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]

But misses all the fields in InheritedFlags and the fields within the struct of the union in NonInheritedFlags.

For example: <http://trac.webkit.org/browser/trunk/WebCore/rendering/style/SVGRenderStyle.h?rev=53300#L139>
And <http://trac.webkit.org/browser/trunk/WebCore/rendering/style/SVGRenderStyle.h?rev=53300#L162>
Comment 1 Shinichiro Hamaji 2010-02-16 03:23:15 PST
Created attachment 48801 [details]
Patch v1
Comment 2 Shinichiro Hamaji 2010-02-16 03:36:13 PST
There were two bugs:

- "unsigned _length" wasn't complained.
- a bitfield wasn't complained.

This patch fixes both. I've ran check-webkit-style for 2180 C++ files in WebKit repository. This change increases the number of error reports by 14. There were no false-positives.
Comment 3 Eric Seidel (no email) 2010-02-17 15:25:31 PST
Comment on attachment 48801 [details]
Patch v1

wooo hoo!
Comment 4 Shinichiro Hamaji 2010-02-17 18:13:16 PST
Comment on attachment 48801 [details]
Patch v1

Clearing flags on attachment: 48801

Committed r54918: <http://trac.webkit.org/changeset/54918>
Comment 5 Shinichiro Hamaji 2010-02-17 18:13:24 PST
All reviewed patches have been landed.  Closing bug.