Bug 6986 - Update perltidyrc file
Summary: Update perltidyrc file
Status: CLOSED WORKSFORME
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Mason James
QA Contact: Bugs List
URL:
Keywords:
Depends on: 7119
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-07 00:35 UTC by Mason James
Modified: 2022-02-02 06:10 UTC (History)
4 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
patch (4.33 KB, patch)
2011-10-07 00:39 UTC, Mason James
Details | Diff | Splinter Review
Bug 6986 - update perltidy with new official style (4.32 KB, patch)
2011-12-31 07:10 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 6986 - add example perltidyrc file to Koha (4.68 KB, patch)
2013-04-29 00:39 UTC, Mason James
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mason James 2011-10-07 00:35:10 UTC

    
Comment 1 Mason James 2011-10-07 00:39:45 UTC Comment hidden (obsolete)
Comment 2 Katrin Fischer 2011-12-21 06:22:02 UTC
Patch still applies to master.
How can this be used?
Comment 3 Chris Cormack 2011-12-31 07:10:27 UTC Comment hidden (obsolete)
Comment 4 Paul Poulain 2012-01-16 17:41:44 UTC
QA comment:
what does this patch do (it generates xt/perltidyrc, I see that, but what it this file made for) ? How can I use it ?
Comment 5 Jonathan Druart 2012-01-19 10:27:44 UTC
@Paul: a perltidyrc file can be used like:
  perltidy --pro=xt/perltidyrc **/*.pm

or
  find C4 -name '*.pm' -print -exec perltidy --pro=xt/perltidyrc {} \
Comment 6 Paul Poulain 2012-01-27 11:16:22 UTC
(In reply to comment #5)
> @Paul: a perltidyrc file can be used like:
>   perltidy --pro=xt/perltidyrc **/*.pm
> 
> or
>   find C4 -name '*.pm' -print -exec perltidy --pro=xt/perltidyrc {} \

Yes, I know, but it was not my question. My question was the same as Katrin one in fact: How to test this patch ?

Marking "failed QA" for now, as I don't see what this patch would add to Koha. I'll be happy to push it once I understand !
Comment 7 Jared Camins-Esakov 2013-01-02 01:23:15 UTC
Mason,

Could you please provide a test plan for this?
Comment 8 Mason James 2013-04-29 00:39:31 UTC
Created attachment 17777 [details] [review]
Bug 6986 - add example perltidyrc file to Koha

xt/perltidyrc generated by running 'perltidy -npro -opt'

to test...

- apply patch
    $ git bz apply 6986

- tidy a random file using the default 'wall' style
    $ perltidy -npro ./install-CPAN.pl  -o ./aa

- tidy a random file using the ./xt/perltidyrc profile
    $ perltidy -pro=./xt/perltidyrc ./install-CPAN.pl  -o ./bb

- compare the 2 output files are identical
    $ diff aa bb |wc -l
    0

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Comment 9 Mason James 2013-04-29 00:41:05 UTC
(In reply to comment #7)
> Mason,
> 
> Could you please provide a test plan for this?

finally... test plan added :)
Comment 10 Katrin Fischer 2013-04-29 20:13:06 UTC
Hi Mason,
if I understood right from the discussion in IRC this file just sets the defaults that perltidy uses - wouldn't it be less confusing to just remove the file?
Comment 11 Mason James 2014-12-03 06:47:27 UTC
(In reply to Katrin Fischer from comment #10)
> Hi Mason,
> if I understood right from the discussion in IRC this file just sets the
> defaults that perltidy uses - wouldn't it be less confusing to just remove
> the file?

yeah, i agree...

this bug can be closed, i think :)