Bug 37245

Summary: Add test script that runs `perl -c` on all Perl files
Product: Koha Reporter: Julian Maurice <julian.maurice>
Component: Architecture, internals, and plumbingAssignee: Julian Maurice <julian.maurice>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: dcook, jonathan.druart
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 35959    
Bug Blocks:    
Attachments: Bug 37245: Add test script that runs `perl -c` on all Perl files
Bug 37245: Add test script that runs `perl -c` on all Perl files

Description Julian Maurice 2024-07-03 13:20:33 UTC

    
Comment 1 Julian Maurice 2024-07-03 13:21:37 UTC
Created attachment 168449 [details] [review]
Bug 37245: Add test script that runs `perl -c` on all Perl files

and minor changes to Koha::Localization and Koha::MarcOverlayRules to
make tests pass

Test plan:
- Run `prove xt/perl-check.t`
- Wait... (it took ~15 minutes for me)
- Should be green at the end
Comment 2 Julian Maurice 2024-07-03 13:24:16 UTC
Do not forget to apply bug 35959 before testing
Comment 3 David Nind 2024-07-03 20:30:41 UTC
Created attachment 168477 [details] [review]
Bug 37245: Add test script that runs `perl -c` on all Perl files

and minor changes to Koha::Localization and Koha::MarcOverlayRules to
make tests pass

Test plan:
- Run `prove xt/perl-check.t`
- Wait... (it took ~15 minutes for me)
- Should be green at the end

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Cook 2024-07-04 01:37:22 UTC
Interesting idea! 

It'll run any code in BEGIN{} but most of the time that's probably fine, as I think we mostly have used that for the Exporter...

Also wow we're using the Exporter more than we should be in Koha::*. Coding guidelines only work when we enforce them, eh...
Comment 5 Jonathan Druart 2024-07-04 11:13:19 UTC
You should use `git ls-tree` to list the files to test.