Bug 24774 - Specify 2 space indentation for JSON files in .editorconfig
Summary: Specify 2 space indentation for JSON files in .editorconfig
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Developer documentation (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lari Taskula
QA Contact: Testopia
URL:
Keywords:
Depends on: 12545
Blocks:
  Show dependency treegraph
 
Reported: 2020-03-02 09:13 UTC by Lari Taskula
Modified: 2020-11-30 21:49 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00


Attachments
Bug 24774: Set JSON indentation of 2 spaces in .editorconfig (729 bytes, patch)
2020-03-02 09:26 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 24774: Set JSON indentation of 2 spaces in .editorconfig (782 bytes, patch)
2020-03-06 16:48 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24774: Set JSON indentation of 2 spaces in .editorconfig (838 bytes, patch)
2020-03-16 21:29 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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