Include .editorconfig file in all repos

Discuss general development subjects that are not specific to a particular version like the versioning control system we use or other infrastructure.
User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Include .editorconfig file in all repos

Post by callumacrae »

http://editorconfig.org/

Instead of making people change their editor settings to contribute to phpBB, this plugin available in a tonne of editors enforces the settings without them having to be changed.

It's used in pretty much every front-end project I've worked with in ages (both Google Web Starter Kit and Bootstrap use it), and Symfony also uses it.

I propose the following .editorconfig:

Code: Select all

# EditorConfig is awesome: http://EditorConfig.org

root = true

[*]
end_of_line = lf
indent_size = 4
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 4
indent_style = space
Made by developers, for developers!
My blog

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

Re: Include .editorconfig file in all repos

Post by naderman »

Why are you not trimming whitespace on .md files?

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: Include .editorconfig file in all repos

Post by callumacrae »

Putting two spaces at the end of a line in MarkDown will prevent it from being wrapped onto the same line:

Code: Select all

hello
world
-> "hello world"

Code: Select all

hello__
world
-> "hello
world" (where underscores are pretending to be spaces)
Made by developers, for developers!
My blog

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: Include .editorconfig file in all repos

Post by callumacrae »

Made by developers, for developers!
My blog

User avatar
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

Re: Include .editorconfig file in all repos

Post by MattF »

Great idea!!
Has an irascible disposition.

User avatar
PayBas
Registered User
Posts: 305
Joined: Tue Jul 29, 2008 6:08 pm
Contact:

Re: Include .editorconfig file in all repos

Post by PayBas »

+1 from me

User avatar
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: Include .editorconfig file in all repos

Post by Arty »

What's the point of that if editors do not support it? Almost all links to projects that use it are to projects that added .editorconfig to their files, not editors that actually support it.

Until editors start supporting it, its just another meaningless file. Most editors don't need it anyway because they detect settings from file.

User avatar
hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 968
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: Include .editorconfig file in all repos

Post by hanakin »

@Arty - its meant to make sure that has all the same settings, even those that are not detected from the file such as trailing whitespace. Also most mainstream editors do support it which means its not a bad idea to include it.
Donations welcome via Paypal Image

User avatar
bantu
3.0 Release Manager
3.0 Release Manager
Posts: 557
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany
Contact:

Re: Include .editorconfig file in all repos

Post by bantu »

Arty wrote:Almost all links to projects that use it are to projects that added .editorconfig to their files, not editors that actually support it.
http://editorconfig.org lists which editors are currently supported.

User avatar
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: Include .editorconfig file in all repos

Post by Arty »

All of those editors require third party plugins.

Post Reply