[webkit-reviews] review granted: [Bug 27377] Assorted cpplint improvements : [Attachment 32954] Turn off erroneous filters preventing valid checks

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 17 12:09:52 PDT 2009


David Levin <levin at chromium.org> has granted Adam Treat <treat at kde.org>'s
request for review:
Bug 27377: Assorted cpplint improvements
https://bugs.webkit.org/show_bug.cgi?id=27377

Attachment 32954: Turn off erroneous filters preventing valid checks
https://bugs.webkit.org/attachment.cgi?id=32954&action=review

------- Additional Comments from David Levin <levin at chromium.org>
> diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
> index 7b66d46..80f3a75 100644
> --- a/WebKitTools/ChangeLog
> +++ b/WebKitTools/ChangeLog
> @@ -3,6 +3,29 @@
>	   Reviewed by NOBODY (OOPS!).
>  
>	   https://bugs.webkit.org/show_bug.cgi?id=27377
> +	   Don't filter whitespace at the end of the line.  This is not
> +	   explicitly a rule of webkit coding style, but there is no reason
> +	   not to warn of this common style problem.
> +
> +	   Don't filter whitespace newline.  This prevents cpplint of
complaining
> +	   about the following situation:

I was confused when I read this because it sounded like removing the filtering
prevented the complaining.

Here's an idea for an alternate wording:
	Don't filter whitespace newline.  Now, cpplint will complain
	about the following situation:


> +
> +	       if (true) {
> +		   doSomething();
> +		   doSomethingAgain();
> +	       }
> +	       else
> +		   doSomething();
> +
> +	   Which is a webkit coding style rule violation.
> +
> +	   * Scripts/modules/cpplint.py:
> +
> +2009-07-17  Adam Treat  <adam.treat at torchmobile.com>
> +
> +	   Reviewed by NOBODY (OOPS!).
> +
> +	   https://bugs.webkit.org/show_bug.cgi?id=27377
>	   This makes cpplint complain about this for instance:
>  
>	       if (true)
> diff --git a/WebKitTools/Scripts/modules/cpplint.py
b/WebKitTools/Scripts/modules/cpplint.py
> index 2ef4e3a..cf22e3d 100644
> --- a/WebKitTools/Scripts/modules/cpplint.py
> +++ b/WebKitTools/Scripts/modules/cpplint.py
> @@ -2786,10 +2786,8 @@ def use_webkit_styles():
>      #	modify the implementation and enable them.
>      global _DEFAULT_FILTERS
>      _DEFAULT_FILTERS = [
> -	   '-whitespace/end_of_line',
>	   '-whitespace/comments',
>	   '-whitespace/blank_line',
> -	   '-whitespace/newline',  # '\r'
>	   '-runtime/explicit',  # explicit
>	   '-runtime/virtual',	# virtual dtor
>	   '-runtime/printf',


More information about the webkit-reviews mailing list