Opened 11 years ago
Closed 11 years ago
#2598 closed enhancement (fixed)
Introduce .editorconfig to bbPress
Reported by: | netweb | Owned by: | netweb |
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | trunk |
Component: | Tools - Code Improvements | Keywords: | commit |
Cc: |
Description
Configuring your editor/IDE for submitting code/patches to bbPress and follow the code styling guidelines of bbPress is not the simplest of tasks...
"EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems."
Particularly as WordPress has now implemented this via #WP26429 if your editor or IDE supports this and you checkout the bbPress repo into a folder contained within the WordPress develop repo the default is to inherit all the rules from the upstream .editorconfig
.
To this end bbPress should include an .editorconfig
file to explicitly declare it's own code styling guidelines or the same .editorconfig
file as WordPress to use their .editorconfig
rules.
via #BuddyPress5638
I just came across this whilst creating a patch for the BuddyPress
package.json
file, WordPress uses 'spaces' for tab indentation whereas BuddyPress are usingtabs
. I quickly fudged the WordPress.editorconfig
file to match BuddyPress' so I could create a patch forpackage.json
to match the current whitespace format.
Attachments (2)
Change History (7)
#2
@
11 years ago
In 2598.2.diff add support for YAML files should use the same code styling as JSON files in .editorconfig
http://yaml.org/spec/1.2/spec.html#id2777534
To maintain portability, tab characters must not be used in indentation
2598.diff is an exact duplicate of WordPress'
.editorconfig
(without the*.txt
andtxt,wp-config-sample.php
)Source: https://core.trac.wordpress.org/browser/trunk/.editorconfig
WordPress Coding Standards http://make.wordpress.org/core/handbook/coding-standards/