<?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>34787</bug_id>
          
          <creation_ts>2010-02-10 01:27:20 -0800</creation_ts>
          <short_desc>Allow underscored identifiers in CSSParser.cpp</short_desc>
          <delta_ts>2010-02-11 21:12:09 -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>All</rep_platform>
          <op_sys>All</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yuzo Fujishima">yuzo</reporter>
          <assigned_to name="Yuzo Fujishima">yuzo</assigned_to>
          <cc>eric</cc>
    
    <cc>hamaji</cc>
    
    <cc>hayato</cc>
    
    <cc>yuzo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>189279</commentid>
    <comment_count>0</comment_count>
    <who name="Yuzo Fujishima">yuzo</who>
    <bug_when>2010-02-10 01:27:20 -0800</bug_when>
    <thetext>Flex (http://flex.sourceforge.net/) uses identifiers named as yy_*.
WebCore/css/CSSParser.cpp needs to handle some such identifiers.

We should relax the style rule for the file to allow underscored identifiers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>189283</commentid>
    <comment_count>1</comment_count>
      <attachid>48474</attachid>
    <who name="Yuzo Fujishima">yuzo</who>
    <bug_when>2010-02-10 01:34:38 -0800</bug_when>
    <thetext>Created attachment 48474
Allow underscored identifiers in CSSParser.cpp</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>189404</commentid>
    <comment_count>2</comment_count>
      <attachid>48474</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-02-10 10:24:45 -0800</bug_when>
    <thetext>Comment on attachment 48474
Allow underscored identifiers in CSSParser.cpp

Seems unfortunate to allow any underscored names in those files when only the yy ones need to be used.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>189840</commentid>
    <comment_count>3</comment_count>
    <who name="Yuzo Fujishima">yuzo</who>
    <bug_when>2010-02-11 17:29:38 -0800</bug_when>
    <thetext>Committed r54690: &lt;http://trac.webkit.org/changeset/54690&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>189911</commentid>
    <comment_count>4</comment_count>
    <who name="Shinichiro Hamaji">hamaji</who>
    <bug_when>2010-02-11 20:28:24 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 48474 [details])
&gt; Seems unfortunate to allow any underscored names in those files when only the
&gt; yy ones need to be used.

Yeah. I think adding an exception like following would be better (or you can even check if the filename is CSSParser.cpp here). What do you guys think?

--- a/WebKitTools/Scripts/webkitpy/style/processors/cpp.py
+++ b/WebKitTools/Scripts/webkitpy/style/processors/cpp.py
@@ -2482,6 +2482,7 @@ def check_identifier_name_in_declaration(filename, line_nu
mber, line, error):
             # Various exceptions to the rule: JavaScript op codes functions, co
nst_iterator.
             if (not (filename.find(&apos;JavaScriptCore&apos;) &gt;= 0 and modified_identifi
er.find(&apos;_op_&apos;) &gt;= 0)
                 and not modified_identifier.startswith(&apos;tst_&apos;)
+                and not modified_identifier.startswith(&apos;yy_&apos;)
                 and not modified_identifier.startswith(&apos;webkit_dom_object_&apos;)
                 and not modified_identifier.startswith(&apos;qt_&apos;)
                 and not modified_identifier.find(&apos;::qt_&apos;) &gt;= 0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>189923</commentid>
    <comment_count>5</comment_count>
    <who name="Yuzo Fujishima">yuzo</who>
    <bug_when>2010-02-11 21:12:09 -0800</bug_when>
    <thetext>On second though, I should have just marked the lines using yy_* with // NOLINT.

As to whether to change the rule, I think:
- only very common names (e.g., m_* and s_*?) should be exempted
   from checking in cpp.py
- file/path name based exemption should be done in one place, i.e., in
   checker.py, Checking file/path in multiple places will lead to confusion.
- It&apos;d be nice if NOLINT mechanism is extended such that
    - we can disable subset of tests rather than the whole, e.g.,
       NOLINT:readability/naming
    - we can specify the range of NOLINT rather than put NOLINT all the lines, e.g.,
       NOLINT_START, NOLINT_END</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>48474</attachid>
            <date>2010-02-10 01:34:38 -0800</date>
            <delta_ts>2010-02-10 10:24:44 -0800</delta_ts>
            <desc>Allow underscored identifiers in CSSParser.cpp</desc>
            <filename>bug-34787-20100210183436.patch</filename>
            <type>text/plain</type>
            <size>1425</size>
            <attacher name="Yuzo Fujishima">yuzo</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYktpdFRvb2xzL0NoYW5nZUxvZyBiL1dlYktpdFRvb2xzL0NoYW5nZUxv
ZwppbmRleCA2NWVlMmRhLi5hNTM3NjE5IDEwMDY0NAotLS0gYS9XZWJLaXRUb29scy9DaGFuZ2VM
b2cKKysrIGIvV2ViS2l0VG9vbHMvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTcgQEAKKzIwMTAtMDIt
MTAgIFl1em8gRnVqaXNoaW1hICA8eXV6b0Bnb29nbGUuY29tPgorCisgICAgICAgIFJldmlld2Vk
IGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIEFsbG93IHVuZGVyc2NvcmVkIGlkZW50aWZp
ZXJzIGluIENTU1BhcnNlci5jcHAKKworICAgICAgICBGbGV4IChodHRwOi8vZmxleC5zb3VyY2Vm
b3JnZS5uZXQvKSB1c2VzIGlkZW50aWZpZXJzIG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gICAjIFRoZXJlIGlzIG5vIGNsZWFuIHdheSB0
byBhdm9pZCAieXlfKiIgbmFtZXMgdXNlZCBieSBmbGV4LgorICAgICAgIldlYkNvcmUvY3NzL0NT
U1BhcnNlci5jcHAiLAogICAgICAgIyBUaGVyZSBpcyBubyBjbGVhbiB3YXkgdG8gYXZvaWQgInh4
eF9kYXRhIiBtZXRob2RzIGluc2lkZQogICAgICAgIyBRdCdzIGF1dG90ZXN0cyBzaW5jZSB0aGV5
IGFyZSBjYWxsZWQgYXV0b21hdGljYWxseSBieSB0aGUKICAgICAgICMgUXRUZXN0IG1vZHVsZS4K
</data>
<flag name="review"
          id="31159"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>