Summary: | koha qa test tools / Test compliance with perlcriticrc | ||
---|---|---|---|
Product: | Project Infrastructure | Reporter: | Mark Tompsett <mtompset> |
Component: | QA tools | Assignee: | Mark Tompsett <mtompset> |
Status: | In Discussion --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | jonathan.druart, katrin.fischer, robin |
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: | ||
Attachments: | Allow print function return value to be ignored. |
Description
Mark Tompsett
2016-01-22 20:41:29 UTC
Created attachment 47222 [details] [review] Allow print function return value to be ignored. TEST PLAN --------- 1) link ~/.perlcriticrc to ~/qa-test-tools/perlcriticrc 2) save simple script --- BEGIN example.pl --- #!/usr/bin/perl use Modern::Perl; our $VERSION = q{1.0}; print "Hello World!\n"; --- END example.pl --- 3) perlcritic -1 example.pl Return value of flagged function ignored - print at line 5, column 1. See pages 208,278 of PBP. (Severity: 1) 4) Apply this patch to the qa test tools 5) redo step 3 example.pl source OK % perlcritic -1 C4/Auth.pm | wc -l 531 Well, it seems that we are not ready at all for level 1... (In reply to Jonathan Druart from comment #2) > Well, it seems that we are not ready at all for level 1... No, but checking the return value for the print function is something I added, because my perlcritic rc file is softlinked to this one, and I sometimes aim to write my code for level 1. :) Could you convince me why we would need this patch? We do not have any occurrences of my $foo = print('bar') in the code. |