[Webkit-unassigned] [Bug 48242] check-webkit-style: false positive reported for #if macro
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Dec 2 18:32:15 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=48242
--- Comment #4 from David Levin <levin at chromium.org> 2010-12-02 18:32:14 PST ---
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 75440 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=75440&action=review
> >
> > Otherwise seems fine.
> >
> > > WebKitTools/Scripts/webkitpy/style/checkers/cpp.py:1461
> > > + in_preprocessor_directive = match(r'\s*#', line)
> >
> > Seems you want a ^ in that regexp to lock it to the front of the string.
> >
> > char* my_invalid_style = "You're #1\n"'; would trigger that regexp even though it shouldn't.
> Good call.
> fwiw, re.match has an implicit ^ (http://docs.python.org/library/re.html#re.match).
> re.search would need the ^
>
> I wish there was only re.search (why have another function just to mean "^" + regex_given?) but match exists, so I guess it makes sense to use it.
But I'll add test for this though.
--
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