<div dir="ltr"><div>I believe we use the default perltidy settings ( <a href="https://wiki.koha-community.org/wiki/Coding_Guidelines#PERL1:_Perltidy">https://wiki.koha-community.org/wiki/Coding_Guidelines#PERL1:_Perltidy</a> ). I'm not aware of KTD having an installed perltidyrc ( there is one in git in xt that's been in there since 2008 presumably unused ).</div><div><br></div><div>Kyle</div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div style="font-size:small">---<br></div></div><div><a href="http://www.kylehall.info" target="_blank">http://www.kylehall.info</a><br>ByWater Solutions ( <a href="http://bywatersolutions.com" target="_blank">http://bywatersolutions.com</a> )<br>Meadville Public Library ( <a href="http://www.meadvillelibrary.org" target="_blank">http://www.meadvillelibrary.org</a> )<br>Crawford County Federated Library System ( <a href="http://www.ccfls.org" target="_blank">http://www.ccfls.org</a> )<br></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 12, 2023 at 6:32 PM David Cook <<a href="mailto:dcook@prosentient.com.au">dcook@prosentient.com.au</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg838175628606399436"><div style="overflow-wrap: break-word;" lang="EN-AU"><div class="m_838175628606399436WordSection1"><p class="MsoNormal">Hi Tomas,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I saw you, Katrin, and Jonathan writing in #koha about perltidy. When I’ve tried previously to perltidy in ktd using the “:Tidy” command, it seemed to change the style to something incompatible with <a href="https://wiki.koha-community.org/wiki/Coding_Guidelines" target="_blank">https://wiki.koha-community.org/wiki/Coding_Guidelines</a><u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">If I type “vi Koha.pm”, then “:echo $MYVIMRC”, it tells me I’m using the /root/.vimrc file. I’m not overwriting that, so it’s the default file that ships with ktd.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I don’t have a good example off the top of my head though. <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I’ve just tried perltidying debian/scripts/koha-log4perl from <a href="https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32791" target="_blank">https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32791</a>. There are things that look weird to me but after reviewing the coding guidelines, maybe I’ve been wrong all this time.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">For example:<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">-                my $snippet = get_snippet({<u></u><u></u></p><p class="MsoNormal">-                    instance => $instance,<u></u><u></u></p><p class="MsoNormal">-                    component => $component,<u></u><u></u></p><p class="MsoNormal">-                });<u></u><u></u></p><p class="MsoNormal">-                if ($snippet){<u></u><u></u></p><p class="MsoNormal">+                my $snippet = get_snippet(<u></u><u></u></p><p class="MsoNormal">+                    {<u></u><u></u></p><p class="MsoNormal">+                        instance  => $instance,<u></u><u></u></p><p class="MsoNormal">+                        component => $component,<u></u><u></u></p><p class="MsoNormal">+                    }<u></u><u></u></p><p class="MsoNormal">+                );<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I always thought we preferred to keep the brackets on the same line (like in all the JS examples on the wiki). <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">It looks like perltidy sometimes mangles the whitespace for comments as well. I’d correctly indented a comment and then perltidy stripped all the whitespace except for 2 leading spaces. <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">That all said… overall it probably does look better, so maybe the out of the box perltidy is good enough, and if the same perltidy file is applied across the board I suppose it doesn’t matter…<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">David Cook<u></u><u></u></p><p class="MsoNormal">Senior Software Engineer<u></u><u></u></p><p class="MsoNormal">Prosentient Systems<u></u><u></u></p><p class="MsoNormal">Suite 7.03<u></u><u></u></p><p class="MsoNormal">6a Glen St<u></u><u></u></p><p class="MsoNormal">Milsons Point NSW 2061<u></u><u></u></p><p class="MsoNormal">Australia<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Office: 02 9212 0899<u></u><u></u></p><p class="MsoNormal">Online: 02 8005 0595<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p></div></div>_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br>
<a href="https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="https://www.koha-community.org/" rel="noreferrer" target="_blank">https://www.koha-community.org/</a><br>
git : <a href="https://git.koha-community.org/" rel="noreferrer" target="_blank">https://git.koha-community.org/</a><br>
bugs : <a href="https://bugs.koha-community.org/" rel="noreferrer" target="_blank">https://bugs.koha-community.org/</a><br>
</div></blockquote></div>