Skip to:

Opened 9 years ago

Closed 9 years ago

#2614 closed defect (bug) (fixed)

Multiple strings in .editorconfig section names should be wrapped in curly brackets

Reported by: treyhunner's profile treyhunner Owned by: netweb's profile netweb
Milestone: 2.6 Priority: normal
Severity: normal Version: trunk
Component: Tools - Code Improvements Keywords: has-patch
Cc: trey@…


The following sections are invalid:

  • *.json,*.yml
  • *.txt,wp-config-sample.php

They should instead be:

  • {*.json,*.yml}
  • {*.txt,wp-config-sample.php}


This is also a problem in bbpress:

Attachments (1)

2614.diff (307 bytes) - added by netweb 9 years ago.

Download all attachments as: .zip

Change History (7)

#1 @treyhunner
9 years ago

  • Cc trey@… added

9 years ago

#2 @netweb
9 years ago

Trey, thanks, I presume still wrapped in square brackets? eg [{*.json,*.yml}] per patch 2614.diff?

Presumably then many of the projects via editorconfig/wiki/Projects-Using-EditorConfig are 'doing it wrong'

A quick look at some of the 'big' projects the only one I saw using braces was Mozilla here

#3 @netweb
9 years ago

  • Component changed from General to Code Improvements
  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 2.6
  • Summary changed from EditorConfig file broken to Multiple strings in .editorconfig section names should be wrapped in curly brackets

#4 @treyhunner
9 years ago

Yes that is correct. Square brackets for the section and curly braces to denote the either-or conditions in the shell glob.

I have only noticed one project "doing it wrong" in this way before. I'll try to comb through some of the other large projects I'm aware of that use EditorConfig.

If you find/found any others that do it incorrectly without braces, please let me know and I'll file an issue with them. Thanks!

#5 @netweb
9 years ago

Created tickets and patches for #WordPress28494 and #BuddyPress5699

#6 @netweb
9 years ago

  • Owner set to netweb
  • Resolution set to fixed
  • Status changed from new to closed

In 5385:

Multiple strings in .editorconfig sections should be wrapped in curly brackets
Props treyhunner. Fixes #2614

Note: See TracTickets for help on using tickets.