<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>33771</bug_id>
          
          <creation_ts>2010-01-17 09:22:19 -0800</creation_ts>
          <short_desc>style-check script reports loads of errors on gtk2drawing.c</short_desc>
          <delta_ts>2010-01-18 01:55:58 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>32833</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Gustavo Noronha (kov)">gustavo</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>cjerdonek</cc>
    
    <cc>commit-queue</cc>
    
    <cc>hamaji</cc>
    
    <cc>mrobinson</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>181605</commentid>
    <comment_count>0</comment_count>
    <who name="Gustavo Noronha (kov)">gustavo</who>
    <bug_when>2010-01-17 09:22:19 -0800</bug_when>
    <thetext>Files WebCore/platform/gtk/gtk2drawing.c and WebCore/platform/gtk/gtk2drawing.h are special - they come from the Mozilla source tree, and we keep style modifications to a minimum on them - I would recommend simply ignoring them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181627</commentid>
    <comment_count>1</comment_count>
      <attachid>46762</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-01-17 15:34:28 -0800</bug_when>
    <thetext>Created attachment 46762
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181635</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-01-17 15:48:05 -0800</bug_when>
    <thetext>*** Bug 33609 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181682</commentid>
    <comment_count>3</comment_count>
      <attachid>46762</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-01-17 18:09:47 -0800</bug_when>
    <thetext>Comment on attachment 46762
Patch

Looks fine, rs=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181689</commentid>
    <comment_count>4</comment_count>
      <attachid>46762</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-01-17 18:39:20 -0800</bug_when>
    <thetext>Comment on attachment 46762
Patch

Clearing flags on attachment: 46762

Committed r53383: &lt;http://trac.webkit.org/changeset/53383&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181690</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-01-17 18:39:24 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181701</commentid>
    <comment_count>6</comment_count>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-01-17 19:22:45 -0800</bug_when>
    <thetext>With this fix, will the style bot still log a single error?

sys.stderr.write(&apos;Ignoring %s; This file is exempt from the style guide.\n&apos; % filename)

With files to exempt, I just wanted to clarify whether they should be silently ignored, or if they should be skipped after logging a single line.

(Again, I&apos;m not sure if the style bot is smart enough to distinguish between different types of errors logged to sys.stderr.write.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181776</commentid>
    <comment_count>7</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-01-18 01:18:13 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; With this fix, will the style bot still log a single error?

The style bot is smart enough to know whether there were any errors.  It looks at the exit code to figure out if the check passed.

&gt; With files to exempt, I just wanted to clarify whether they should be silently
&gt; ignored, or if they should be skipped after logging a single line.

I put the logging in to make sure that folks using the tool know that they aren&apos;t getting coverage on those files.  It will show up in bugzilla if there are other errors caught by the bot, but it won&apos;t generate a bug post on its own.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181779</commentid>
    <comment_count>8</comment_count>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-01-18 01:35:24 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; (In reply to comment #6)
&gt; &gt; With this fix, will the style bot still log a single error?
&gt; 
&gt; The style bot is smart enough to know whether there were any errors.  It looks
&gt; at the exit code to figure out if the check passed.
&gt; 
&gt; &gt; With files to exempt, I just wanted to clarify whether they should be silently
&gt; &gt; ignored, or if they should be skipped after logging a single line.
&gt; 
&gt; I put the logging in to make sure that folks using the tool know that they
&gt; aren&apos;t getting coverage on those files.  It will show up in bugzilla if there
&gt; are other errors caught by the bot, but it won&apos;t generate a bug post on its
&gt; own.

Okay, thanks, Adam.  Just to clarify, then, it seems like there are two classes of file exemptions:

(1) exemptions-with-warnings, e.g. files named &quot;gtk2drawing.c&quot;
    and files in the folder &quot;WebKit/qt/Api/&quot;, and
(2) exemptions-without-warnings, e.g. all files in the &quot;LayoutTests&quot;
    folder.

If that&apos;s correct, I will make an explicit note of this in the code in my next patch.  Can you provide a rough rule of thumb as to which type new exemptions should belong to?  For example, which type should the &quot;JavaScriptGlue&quot; folder belong to?

https://lists.webkit.org/pipermail/webkit-dev/2009-December/011047.html

(e-mail referencing JavaScriptGlue)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181790</commentid>
    <comment_count>9</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-01-18 01:55:58 -0800</bug_when>
    <thetext>&gt; Okay, thanks, Adam.  Just to clarify, then, it seems like there are two classes
&gt; of file exemptions:
&gt; 
&gt; (1) exemptions-with-warnings, e.g. files named &quot;gtk2drawing.c&quot;
&gt;     and files in the folder &quot;WebKit/qt/Api/&quot;, and
&gt; (2) exemptions-without-warnings, e.g. all files in the &quot;LayoutTests&quot;
&gt;     folder.

Yes.  Although the code calls (2) can_handle.

&gt; If that&apos;s correct, I will make an explicit note of this in the code in my next
&gt; patch.  Can you provide a rough rule of thumb as to which type new exemptions
&gt; should belong to?

It&apos;s some optimization problem between the principle of least surprise and not spamming useless information.  For example, I don&apos;t think anyone would be surprised that the LayoutTests aren&apos;t covered and if we included a warning that warning would be spammed on every patch.  On the other hand, it&apos;s kind of surprising that don&apos;t have style coverage for gtk2drawing.c and that file isn&apos;t modified that often.  That makes printing the error a better trade-off.

&gt; For example, which type should the &quot;JavaScriptGlue&quot; folder
&gt; belong to?

I&apos;d print the warning.  I&apos;ve never seen that folder changed so the spam problem is quite low.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>46762</attachid>
            <date>2010-01-17 15:34:28 -0800</date>
            <delta_ts>2010-01-17 18:39:19 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-33771-20100117153426.patch</filename>
            <type>text/plain</type>
            <size>3346</size>
            <attacher name="Adam Barth">abarth</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYktpdFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBXZWJLaXRUb29scy9D
aGFuZ2VMb2cJKHJldmlzaW9uIDUzMzcyKQorKysgV2ViS2l0VG9vbHMvQ2hhbmdlTG9nCSh3b3Jr
aW5nIGNvcHkpCkBAIC0xLDMgKzEsMTYgQEAKKzIwMTAtMDEtMTcgIEFkYW0gQmFydGggIDxhYmFy
dGhAd2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