Bug 24774

Summary: Specify 2 space indentation for JSON files in .editorconfig
Product: Koha Reporter: Lari Taskula <lari.taskula>
Component: Developer documentationAssignee: Lari Taskula <lari.taskula>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: 1joynelson
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00
Bug Depends on: 12545    
Bug Blocks:    
Attachments: Bug 24774: Set JSON indentation of 2 spaces in .editorconfig
Bug 24774: Set JSON indentation of 2 spaces in .editorconfig
Bug 24774: Set JSON indentation of 2 spaces in .editorconfig

Description Lari Taskula 2020-03-02 09:13:51 UTC
From Bug 12545
>> 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/

Editors using .editorconfig by default set 4 space indentation in JSON files although we have typically been using 2 spaces.
Comment 1 Lari Taskula 2020-03-02 09:26:54 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2020-03-06 16:48:45 UTC
Created attachment 100280 [details] [review]
Bug 24774: Set JSON indentation of 2 spaces in .editorconfig

To test:
1. Start an editor that supports .editorconfig
2. Open or create a JSON file
3. Observe identation is set to 2 spaces by default

Sponsored-by: Hypernova Oy

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Katrin Fischer 2020-03-16 21:29:15 UTC
Created attachment 100826 [details] [review]
Bug 24774: Set JSON indentation of 2 spaces in .editorconfig

To test:
1. Start an editor that supports .editorconfig
2. Open or create a JSON file
3. Observe identation is set to 2 spaces by default

Sponsored-by: Hypernova Oy

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Martin Renvoize 2020-03-19 09:39:52 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 5 Joy Nelson 2020-04-03 20:30:07 UTC
enhancement not backported to 19.11.x