[Bug 42092] New: Remove space in use of qw
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 Bug ID: 42092 Summary: Remove space in use of qw Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org Usual syntax for strings array is qw( xxx ), sometimes qw{ xxx } or qw/ xxx /. In a few cases there is a space : qw /xxx/. Looks like this is a correct syntax and not managed by Perl Tidy. I would prefer it to be avoided so that code looks always the same. Also it is not known in my editor (EPIC in Eclipse IDE), maybe other users are impacted. So I propose to patch it. Even add to QA tools if QA team found this a good idea. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |fridolin.somers@biblibre.co |ity.org |m -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 --- Comment #1 from Fridolin Somers <fridolin.somers@biblibre.com> --- This may be also useful when scapping code for strings. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 --- Comment #2 from Fridolin Somers <fridolin.somers@biblibre.com> --- Oh looks like this can fix some wrong tidy : diff --git a/Koha/OAI/Client/Harvester.pm b/Koha/OAI/Client/Harvester.pm index 0cb24cedee..fda685b167 100644 --- a/Koha/OAI/Client/Harvester.pm +++ b/Koha/OAI/Client/Harvester.pm @@ -31,7 +31,7 @@ use utf8; use open qw( :std :utf8 ); use C4::Biblio qw( AddBiblio GetFrameworkCode ModBiblio DelBiblio ); -use C4::AuthoritiesMarc qw (AddAuthority GuessAuthTypeCode ModAuthority DelAuthority ); +use C4::AuthoritiesMarc qw( AddAuthority GuessAuthTypeCode ModAuthority DelAuthority ); After tiding. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 --- Comment #3 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 195333 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195333&action=edit Bug 42092: Remove space in use of 'qw/' Use syntax 'qw(' instead of 'qw /'. Also use one value per line, makes code reading and versionning easier. This is not enforced by Perl Tidy. Just a syntax change so no test plan. Just run unit tests : t/db_dependent/Koha.t t/Koha/SearchEngine/Elasticsearch/QueryBuilder.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 --- Comment #4 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 195334 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195334&action=edit Bug 42092: Remove space in use of 'qw(' Just a syntax change so no test plan needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195333|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195334|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 195359 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195359&action=edit Bug 42092: Remove space in use of 'qw/' Use syntax 'qw(' instead of 'qw /'. Also use one value per line, makes code reading and versionning easier. This is not enforced by Perl Tidy. Just a syntax change so no test plan. Just run unit tests : t/db_dependent/Koha.t t/Koha/SearchEngine/Elasticsearch/QueryBuilder.t Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 195360 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195360&action=edit Bug 42092: Remove space in use of 'qw(' Just a syntax change so no test plan needed. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.derscheid@lmscloud.de Status|Signed Off |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195359|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 196055 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196055&action=edit Bug 42092: Remove space in use of 'qw/' Use syntax 'qw(' instead of 'qw /'. Also use one value per line, makes code reading and versionning easier. This is not enforced by Perl Tidy. Just a syntax change so no test plan. Just run unit tests : t/db_dependent/Koha.t t/Koha/SearchEngine/Elasticsearch/QueryBuilder.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196055|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 196056 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196056&action=edit Bug 42092: Remove space in use of 'qw/' Use syntax 'qw(' instead of 'qw /'. Also use one value per line, makes code reading and versionning easier. This is not enforced by Perl Tidy. Just a syntax change so no test plan. Just run unit tests : t/db_dependent/Koha.t t/Koha/SearchEngine/Elasticsearch/QueryBuilder.t Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195360|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 196057 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196057&action=edit Bug 42092: Remove space in use of 'qw(' Just a syntax change so no test plan needed. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |jonathan.druart@gmail.com --- Comment #10 from Jonathan Druart <jonathan.druart@gmail.com> --- We need an xt test and/or a QA check in the koha-qa.pl script. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 --- Comment #11 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 197788 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197788&action=edit Bug 42092: Introduce Perl::Critic::Policy::ValuesAndExpressions::RequireQwParentheses Patch from commit 4f1746f -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 --- Comment #12 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 197789 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197789&action=edit Bug 42092: Add the new policy to t/00-testcritic.t Patch from commit fa7f9df -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #13 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Jonathan Druart from comment #10)
We need an xt test and/or a QA check in the koha-qa.pl script.
Bug 42092: Add the new policy to t/00-testcritic.t
Or better, a custom perlcritic policy? There are a lot of other occurrences caught by the test now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42092 --- Comment #14 from Fridolin Somers <fridolin.somers@biblibre.com> --- Oh I think we should also allow q{xxx} very useful for empty string q{} and for SQL queries for example q{ SELECT COUNT(*) FROM table WHERE text="Some" } -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org