Actions
action #99678
closedSpeedup tidy
Description
Motivation¶
perltidy is used in multiple projects, e.g. os-autoinst, openQA and os-autoinst-distri-opensuse. In os-autoinst for me it takes already 22s for a noop, for os-autoinst-distri-opensuse considerably longer. Would be great if we can improve that. https://metacpan.org/dist/Code-TidyAll/view/bin/tidyall sounds like a good approach as it has a local file signature cache that sounds promising. But when I ran it locally on os-autoinst it changed the copyright character and eventually failed with
Wide character in print at /usr/lib/perl5/vendor_perl/5.26.1/Path/Tiny.pm line 537.
Wide character in subroutine entry at /usr/lib/perl5/vendor_perl/5.26.1/Code/TidyAll/CacheModel.pm line 125.
Acceptance criteria¶
- AC1: A noop run of tidy is considerably quicker in os-autoinst-distri-opensuse
- AC2: The same solution is applied for os-autoinst+openQA+os-autoinst-distri-opensuse
Suggestions¶
- Try to run https://metacpan.org/dist/Code-TidyAll/view/bin/tidyall on os-autoinst, fix any problems, add config to exclude copyright comments or just change the comments accordingly, then integrate into build system and adapt the same for openQA and os-autoinst-distri-opensuse
- If possible also use Code::TidyAll for testing, e.g. follow https://perlmaven.com/run-perl-tidy-to-beautify-the-code
Actions