Opened 11 years ago
Closed 11 years ago
#2614 closed defect (bug) (fixed)
Multiple strings in .editorconfig section names should be wrapped in curly brackets
Reported by: | treyhunner | Owned by: | netweb |
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | trunk |
Component: | Tools - Code Improvements | Keywords: | has-patch |
Cc: | trey@… |
Description
The following sections are invalid:
- *.json,*.yml
- *.txt,wp-config-sample.php
They should instead be:
- {*.json,*.yml}
- {*.txt,wp-config-sample.php}
See http://editorconfig.org/#file-format-details
This is also a problem in bbpress: https://bbpress.trac.wordpress.org/changeset/5383
Attachments (1)
Change History (7)
#3
@
11 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
@
11 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
@
11 years ago
Created tickets and patches for #WordPress28494 and #BuddyPress5699
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