Bug 12545 - Add EditorConfig file to the source tree
Summary: Add EditorConfig file to the source tree
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Developer documentation (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 24774
  Show dependency treegraph
 
Reported: 2014-07-09 14:18 UTC by Tomás Cohen Arazi
Modified: 2020-03-02 09:14 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 12545: Add EditorConfig.org file to the source tree (1.22 KB, patch)
2014-07-09 14:31 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 12545: Add EditorConfig.org file to the source tree (1.28 KB, patch)
2014-07-29 07:04 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 12545: Add EditorConfig.org file to the source tree (1.34 KB, patch)
2014-08-22 10:03 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2014-07-09 14:18:58 UTC
It'd be usefull to have a .editorconfig [1] file, that enforces some of our coding guidelines, in the source tree top level.

Those developers that have their editors configured to honour the file, will benefit. Those that wouldn't use it, won't get bothered by the addition. So, a harmless addition that would benefit those that are interested.

There are plugins for several major editors:
- Emacs
- Vim
- SublimeText
- and so on...

[1] http://editorconfig.org/
Comment 1 Tomás Cohen Arazi 2014-07-09 14:31:13 UTC Comment hidden (obsolete)
Comment 2 David Cook 2014-07-23 23:35:51 UTC
I saw that there is a Notepad++ plugin (which is what I usually use), so I'd be keen to try this out sometime...
Comment 3 Tomás Cohen Arazi 2014-07-23 23:42:06 UTC
(In reply to David Cook from comment #2)
> I saw that there is a Notepad++ plugin (which is what I usually use), so I'd
> be keen to try this out sometime...

There is, indeed a plugin for it. The key idea is that if anyone works on different projects with different coding guidelines, the Koha-specific config is confined to the project.

Also, for people starting, we could add it (installing the necesary plugin) to the list of steps to setup the dev environment.
Comment 4 Chris Cormack 2014-07-29 07:04:31 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2014-08-22 10:03:40 UTC
Created attachment 31070 [details] [review]
Bug 12545: Add EditorConfig.org file to the source tree

This patch adds a .editorconfig file to the source tree, that
enforces some of our coding guidelines.

Some editors try to detect the desired configurations from the currently
opened file. As we have tons of old code that doesn't follow our current
coding guidelines, this can lead to unintended QA problmes.

To test:
- Apply the patch
- Verify the .editorconfig file is in the top-level directory
- See the .editorconfig file expresses our coding guidelines

Regards
To+

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 6 Tomás Cohen Arazi 2014-08-22 14:14:49 UTC
Patch pushed to master.