[Webkit-unassigned] [Bug 34173] style tool: Improve treatment of conditions and rest of the line for if, else, switch and alikes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 27 09:31:47 PST 2010


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





--- Comment #7 from anton muhin <antonm at chromium.org>  2010-01-27 09:31:46 PST ---
(In reply to comment #5)
> (From update of attachment 47541 [details])
> Thanks for fixes! Please feel free to land this patch if you agree with my
> comments and fix them.
> 
> > +def up_to_unmatched_closing_paren(s):
> > +    """Splits a string into two parts up to first unmatched ) (assuming
> > +    that |s| is a rest right after (.
> > +
> > +    Returns None, None if there is no unmatched )
> > +    """
> 
> Please follow conventions of docstrings. It should be like
> 
> """Splits a string into two parts up to first unmatched ')'.
> 
> Args:
>   s: a string which is a substring of line after "(".
>      (e.g., "a == (b + c)) {").
> 
> Returns:
>   A pair of strings (e.g., "a == (b + c))" and " {").
> 
> """
> 
> or something like this. It would be nicer if the argument s has a better name,
> I couldn't come up with one though.
> 
> > +    in_macro = match(r'\s*#define', line)
> 
> I think we can move this line to just before the check of single line
> statements (line 1350).

Hopefully all the comments are addressed, but I'd appreciate if you have a
final look.

Regarding in macro: I thought it might be a useful thing for the rest of the
code, but yes, I agree that at least for now we'd better move it closer to the
use.

Thanks a lot for review, Shinichiro!

-- 
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