[wp-trac] [WordPress Trac] #28494: Multiple strings in .editorconfig section names should be wrapped in curly brackets

WordPress Trac noreply at wordpress.org
Tue Jun 24 07:00:14 UTC 2014


#28494: Multiple strings in .editorconfig section names should be wrapped in curly
brackets
------------------------------+------------------------------
 Reporter:  netweb            |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Build/Test Tools  |     Version:  trunk
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |     Focuses:
------------------------------+------------------------------

Comment (by netweb):

 Replying to [comment:3 treyhunner]:

 Thanks for the feedback Trey,

 > The current syntax is simply wrong, so any change is an improvement.
 The only kind of file [*.json,*.yml] will match is something like
 "word.json,anotherword.yml".

 It wasn't wrong when we initially added .editorconfig to WordPress in
 February ;)

 If we patch it using {curly braces}:

 * IDE/Text Editors with an up to date implementation of .editorconfig
 0.11.0 spec will match those files.

 * IDE/Text Editors without an up to date implementation will not match the
 files correctly.

 Is there a list of common IDE/Text Editors support of the 0.11.0
 .editorconfig spec? Has it been widely implemented?

 > If you really don't want to use the curly brace notation you can always
 expand each glob into separate sections like jQuery still does in theirs:
 https://github.com/jquery/jquery/blob/949dfe52bc228efe2d0cb2d696b822ef2a5723d1/.editorconfig
 >
 > Keep in mind that the curly brace notation is very common now and jQuery
 was one of the first projects to adopt the notation which is why they
 still use the old notation.
 This is an option.

 > So in summary: I vote for the curly brace notation, but manually
 expanding into separate sections would work just fine as well.  I'll just
 be glad to see the notation fixed to something parseable.

 I'm also in favour of this now, per the files affected listed below this
 is a tiny set of files affected by this change.

 ----
 Note: Files affected by this change:

 * `wp-config-sample.php`
 * `wp-cli.yml`
 * `.travis.yml`
 * `package.json`
 * 17 only 3rd party library `license.txt`, `COPYING.txt`, `README.txt` and
 similar named .txt files

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28494#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list