Bug 27375 - Set YAML file settings in .editorconfig
Summary: Set YAML file settings in .editorconfig
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Developer documentation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Johanna Räisä
QA Contact: Tomás Cohen Arazi (tcohen)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-11 07:46 UTC by Johanna Räisä
Modified: 2022-06-06 20:25 UTC (History)
3 users (show)

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


Attachments
Bug 27375: Set YAML file settings in .editorconfig (714 bytes, patch)
2021-01-11 07:58 UTC, Johanna Räisä
Details | Diff | Splinter Review
Bug 27375: Set YAML file settings in .editorconfig (768 bytes, patch)
2021-10-29 18:05 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Johanna Räisä 2021-01-11 07:46:38 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/

We have been using 2 space indentation and single quotes with YAML files. Editors which are using the .editorconfig file will change these when editing the files.
Comment 1 Johanna Räisä 2021-01-11 07:58:07 UTC
Created attachment 115004 [details] [review]
Bug 27375: Set YAML file settings in .editorconfig

To test:
1) Start an editor that supports .editorconfig.
2) Open YAML file mappings.yaml for example.
3) Format the file.
4) Observe that nothing changes.

Sponsored-by: Koha-Suomi Oy
Comment 2 Tomás Cohen Arazi (tcohen) 2021-10-29 18:05:55 UTC
Created attachment 127102 [details] [review]
Bug 27375: Set YAML file settings in .editorconfig

To test:
1) Start an editor that supports .editorconfig.
2) Open YAML file mappings.yaml for example.
3) Format the file.
4) Observe that nothing changes.

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Tomás Cohen Arazi (tcohen) 2021-10-29 18:06:19 UTC
Good catch, Johanna.

Thanks!
Comment 4 Jonathan Druart 2021-11-03 14:30:30 UTC
Pushed to master for 21.11, thanks to everybody involved!