Bug 33724 - check-webkit-style: Misses variables that contain underscores.
Summary: check-webkit-style: Misses variables that contain underscores.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-15 10:54 PST by Daniel Bates
Modified: 2010-02-17 18:13 PST (History)
3 users (show)

See Also:


Attachments
Patch v1 (4.16 KB, patch)
2010-02-16 03:23 PST, Shinichiro Hamaji
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.