[Bug 39152] New: Variables defined as `our` not tidied
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39152 Bug ID: 39152 Summary: Variables defined as `our` not tidied Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org If you look at `tools/newHolidays` you will notice the file is not tidy. To reproduce: 1. Look at `tools/newHolidays` which is clearly not tidy 2. Run: $ ktd --shell k$ perl misc/devel/tidy.pl tools/newHolidays.pl k$ git diff => FAIL: No changes! 3. Replace `our` for `my` on the variable definitions 4. Repeat 2 => SUCCESS: The file is correctly tidied now! -- 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=39152 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@gmail.com |ity.org | CC| |tomascohen@gmail.com Depends on| |38664 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38664 [Bug 38664] Tidy the whole codebase -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39152 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |minor -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39152 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- I don't understand, this is not correct: % git show d659526b5ae3363de6dc7691a782a45aaf781a46 -- tools/newHolidays.pl It has been modified by bug 38664. I have also tried: perltidy tools/newHolidays.pl vim tools/newHolidays.pl :%s/our \$/my $ :x git diff diff --git a/tools/newHolidays.pl b/tools/newHolidays.pl index 9cca4a9bc97..722f86859f4 100755 --- a/tools/newHolidays.pl +++ b/tools/newHolidays.pl @@ -33,16 +33,16 @@ my $dbh = C4::Context->dbh(); checkauth( $input, 0, { tools => 'edit_calendar' }, 'intranet' ); -our $branchcode = $input->param('newBranchName'); +my $branchcode = $input->param('newBranchName'); my $originalbranchcode = $branchcode; -our $weekday = $input->param('newWeekday'); -our $day = $input->param('newDay'); -our $month = $input->param('newMonth'); -our $year = $input->param('newYear'); +my $weekday = $input->param('newWeekday'); +my $day = $input->param('newDay'); +my $month = $input->param('newMonth'); +my $year = $input->param('newYear'); my $dateofrange = $input->param('dateofrange'); -our $title = $input->param('newTitle'); -our $description = $input->param('newDescription'); -our $newoperation = $input->param('newOperation'); +my $title = $input->param('newTitle'); +my $description = $input->param('newDescription'); +my $newoperation = $input->param('newOperation'); my $allbranches = $input->param('allBranches'); my $first_dt = DateTime->new( year => $year, month => $month, day => $day ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39152 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Tomás Cohen Arazi (tcohen) from comment #0)
If you look at `tools/newHolidays` you will notice the file is not tidy.
To reproduce: 1. Look at `tools/newHolidays` which is clearly not tidy 2. Run: $ ktd --shell k$ perl misc/devel/tidy.pl tools/newHolidays.pl k$ git diff => FAIL: No changes! 3. Replace `our` for `my` on the variable definitions 4. Repeat 2 => SUCCESS: The file is correctly tidied now!
Or did you mean that the "our" lines were not tidy? And not the whole file. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39152 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think it was only the lines with our. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39152 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39152 Bug 39152 depends on bug 38664, which changed state. Bug 38664 Summary: Tidy the whole codebase https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38664 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org