[Webkit-unassigned] [Bug 32051] check-webkit-style should check for camelCase variable names

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 3 12:45:55 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=32051


David Levin <levin at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #44252|review?                     |review+, commit-queue-
               Flag|                            |




--- Comment #16 from David Levin <levin at chromium.org>  2009-12-03 12:45:54 PST ---
(From update of attachment 44252)
Looks good. I've noted a few things that you may want to consider changing when
landing but none are critical.

> diff --git a/WebKitTools/Scripts/modules/cpp_style.py b/WebKitTools/Scripts/modules/cpp_style.py
> +def check_identifier_name_in_declaration(filename, line_number, line, error):
> +    """Checks if identifier names contain any underscores.
> +
> +    As identifiers in libraries we are using have a bunch of
> +    underscores, we only warn the declarations of identifiers and

s/warn/warn about/


> +      error: The function to call with any errors found.
> +    """
> +    if match('\s*return', line):

Should there be a \b after return?

> +    # Convert "long long", "long double", and "long long int" to
> +    # simple types, but don't remove simple "long".
> +    line = sub(r'long (?:long )?(?=long|double|int)', '', line)

I'm not sure why this uses the non-group form of parenthesis (and the same
comment goes for other places especially now that the code uses named groups).
(The code doesn't need the group, but putting in the ?: just introduces more
visual noise for me at least.)

> +    line = sub(r'^\s*for\s*\(', '', line)
> +    line, control_statement = subn(r'^\s*(?:while|else if|if|switch)\s*\(', '', line)

I think qt uses foreach as well but it is probably fine to leave it as
unsupported for now.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list