Bug 27375

Summary: Set YAML file settings in .editorconfig
Product: Koha Reporter: Johanna Räisä <johanna.raisa>
Component: Developer documentationAssignee: Johanna Räisä <johanna.raisa>
Status: CLOSED FIXED QA Contact: Tomás Cohen Arazi (tcohen) <tomascohen>
Severity: enhancement    
Priority: P5 - low CC: dcook, kyle, tomascohen
Version: Main   
Hardware: All   
OS: All   
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
Bug 27375: Set YAML file settings in .editorconfig

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!