Bug 124821

Summary: check-webkit-style should check for extraneous newline between config.h and primary header
Product: WebKit Reporter: Brian Burg <burg>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, glenn, llango.u-szeged, ossy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
URL: http://www.webkit.org/coding/coding-style.html#include-config-h
Attachments:
Description Flags
patch
ossy: review+, ossy: commit-queue-
patch fix none

Description Brian Burg 2013-11-24 18:04:48 PST
The solution should be added in the vicinity of Source/Tools/Scripts/webkitpy/style/checkers/cpp.py, in function check_include_line.
Comment 1 László Langó 2013-11-27 06:04:11 PST
(In reply to comment #0)
> The solution should be added in the vicinity of Source/Tools/Scripts/webkitpy/style/checkers/cpp.py, in function check_include_line.

Why do you want an extra blank line between the config.h and primary header? On the given URL there is no such rule.
Comment 2 Brian Burg 2013-11-27 10:39:29 PST
extraneous, meaning that it is not necessary. So the following is good:

#include "config.h"
#include "Foo.h"

the following is discouraged:

#include "config.h"

#include "Foo.h"
Comment 3 Gergő Balogh 2013-11-29 00:58:07 PST
Created attachment 218038 [details]
patch
Comment 4 Csaba Osztrogonác 2013-11-29 03:02:48 PST
Comment on attachment 218038 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=218038&action=review

> Tools/Scripts/webkitpy/style/checkers/cpp.py:2821
>      # Check to make sure we have a blank line after primary header.

Please fix this comment before landing.
Comment 5 Gergő Balogh 2013-11-29 05:42:00 PST
Created attachment 218055 [details]
patch fix
Comment 6 WebKit Commit Bot 2013-11-29 06:30:13 PST
Comment on attachment 218055 [details]
patch fix

Clearing flags on attachment: 218055

Committed r159872: <http://trac.webkit.org/changeset/159872>
Comment 7 WebKit Commit Bot 2013-11-29 06:30:15 PST
All reviewed patches have been landed.  Closing bug.