What's the definitive way to use Perl tidy in koha-testing-docker?
Hi all, I've heard a few people saying lately that they wish people would use Perl tidy more. So I used the ":Tidy" command in koha-testing-docker on my visual selection and I got the following: + $this_item->{shelves} = + Koha::Virtualshelves->get_shelves_containing_record( + { + biblionumber => $biblionumber, + borrowernumber => $loggedinuser, + } + ); But that goes against the Indentation coding guidelines from https://wiki.koha-community.org/wiki/Coding_Guidelines#Indentation So. what are we supposed to be doing these days? David Cook Senior Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia Office: 02 9212 0899 Online: 02 8005 0595
Hi David, when using perltidy in my editor with the standard configuration, the indentation appears to be correct. But I am not sure what you mean with :Tidy in ktd? It looks like our coding guidelines matches the defaults for PerlTidy: n=4 and space. Could it be that some local config file is used instead of the default? There is a wiki page for how to use PerlTidy that we might want to update with any findings: https://wiki.koha-community.org/wiki/Perltidy Katrin On 09.12.22 04:26, David Cook wrote:
Hi all,
I’ve heard a few people saying lately that they wish people would use Perl tidy more.
So I used the “:Tidy” command in koha-testing-docker on my visual selection and I got the following:
+ $this_item->{shelves} =
+ Koha::Virtualshelves->get_shelves_containing_record(
+ {
+ biblionumber => $biblionumber,
+ borrowernumber => $loggedinuser,
+ }
+ );
But that goes against the Indentation coding guidelines from https://wiki.koha-community.org/wiki/Coding_Guidelines#Indentation
So… what are we supposed to be doing these days?
David Cook
Senior Software Engineer
Prosentient Systems
Suite 7.03
6a Glen St
Milsons Point NSW 2061
Australia
Office: 02 9212 0899
Online: 02 8005 0595
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website :https://www.koha-community.org/ git :https://git.koha-community.org/ bugs :https://bugs.koha-community.org/
I normally point vscode's perltidy extension to the shipped perltidyrc: https://git.koha-community.org/Koha-community/Koha/src/branch/master/xt/perl... and do Ctrl+k-f on the region I'm editing. El vie, 9 dic 2022 0:27, David Cook <dcook@prosentient.com.au> escribió:
Hi all,
I’ve heard a few people saying lately that they wish people would use Perl tidy more.
So I used the “:Tidy” command in koha-testing-docker on my visual selection and I got the following:
+ $this_item->{shelves} =
+ Koha::Virtualshelves->get_shelves_containing_record(
+ {
+ biblionumber => $biblionumber,
+ borrowernumber => $loggedinuser,
+ }
+ );
But that goes against the Indentation coding guidelines from https://wiki.koha-community.org/wiki/Coding_Guidelines#Indentation
So… what are we supposed to be doing these days?
David Cook
Senior Software Engineer
Prosentient Systems
Suite 7.03
6a Glen St
Milsons Point NSW 2061
Australia
Office: 02 9212 0899
Online: 02 8005 0595
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
Hm, so we have a mismatch between documentation and real life use? Wiki: "The offical perltidy style for perl code in Koha is the perltidy 'default' or 'larry-wall' style. There was a customised perltidy style in Koha for a while, but it was never official or enforced and later removed." There is also: *Bug 30002* <https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30002> - Remove unused xt/perltidyrc On 11.12.22 16:00, Tomas Cohen Arazi wrote:
I normally point vscode's perltidy extension to the shipped perltidyrc:
https://git.koha-community.org/Koha-community/Koha/src/branch/master/xt/perl...
and do Ctrl+k-f on the region I'm editing.
El vie, 9 dic 2022 0:27, David Cook <dcook@prosentient.com.au> escribió:
Hi all,
I’ve heard a few people saying lately that they wish people would use Perl tidy more.
So I used the “:Tidy” command in koha-testing-docker on my visual selection and I got the following:
+ $this_item->{shelves} =
+ Koha::Virtualshelves->get_shelves_containing_record(
+ {
+ biblionumber => $biblionumber,
+ borrowernumber => $loggedinuser,
+ }
+ );
But that goes against the Indentation coding guidelines from https://wiki.koha-community.org/wiki/Coding_Guidelines#Indentation
So… what are we supposed to be doing these days?
David Cook
Senior Software Engineer
Prosentient Systems
Suite 7.03
6a Glen St
Milsons Point NSW 2061
Australia
Office: 02 9212 0899
Online: 02 8005 0595
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website :https://www.koha-community.org/ git :https://git.koha-community.org/ bugs :https://bugs.koha-community.org/
participants (3)
-
David Cook -
Katrin Fischer -
Tomas Cohen Arazi