[Webkit-unassigned] [Bug 30362] check-webkit-style is wrong about indent checking in namespaces in header files
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Oct 15 18:08:10 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=30362
--- Comment #3 from Carol Szabo <carol.szabo at nokia.com> 2009-10-15 18:08:10 PDT ---
(In reply to comment #2)
> I should be able to look at this patch in a few hours.
>
> But I'm concerned about supporting this style:
>
> namespace test {
> void f(
> #if HAVE(LONG_LONG_INT)
> long long int);
> #else
> long int);
> #endif
> }
>
> Code like this breaks a several things
> * indenting in editor (like emacs for example)
> * makes any interline checks in check-webkit-style more fragile as you're
> noting.
>
> Personally, rather than change check-webkit-style, I'd much prefer discourage
> this coding pattern in favor of any of the following:
>
> namespace test {
> void f(
> #if HAVE(LONG_LONG_INT)
> long long int
> #else
> long int
> #endif
> );
> }
> or
>
> namespace test {
> #if HAVE(LONG_LONG_INT)
> void f(long long int);
> #else
> void f(long int);
> #endif
> }
>
> or
>
> namespace test {
> #if HAVE(LONG_LONG_INT)
> typedef long long int ReallyLongInt;
> #else
> typedef long int ReallyLongInt;
> #endif
> void f(ReallyLongInt);
> }
>
> I'd almost recommend putting something in check-webkit-style to avoid the given
> style but first that would have to be discussed on webkit-dev.
>
> Comments?
Then its good because my patch flags that code (despite the fact that that was
not the intent.
--
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