On Thu, Dec 12, 2024 at 02:13:40PM +1100, Peter Smith wrote: > TBH, I have no idea what logic perltidy uses. I did find some > configurations here [1] (are those what it pgperltidy uses?) but those > claim max line length is 78 which I didn't come anywhere near > exceeding.
Gave up trying to understand its internals and its rules years ago. It's complicated enough that we require a specific version of the tool for the tree with a custom PATH :D > After some more experimentation, I've noticed that it is trying to > keep only 2 items on each line. So whether it looks good or not seems > to depend if there is an even or odd number of options without > arguments up-front. Maybe those perltidy "tightness" switches? Don't recall so even under Perl-Tidy-20230309, because it comes down to the number of elements in these arrays and the length of their values, not the specific values in each element of the array. > So, AFAICT I can workaround the perltidy wrapping just by putting all > the noarg options at the bottom of the command, then all the > option/optarg pairs (ie 2s) will stay together. I can post another > patch to do it this way unless you think it is too hacky. This trick works for me if that makes the long list of option easier to read. With two elements of the array perl line, I would just put some --dry-run or --verbose at the end of their respective arrays. -- Michael
signature.asc
Description: PGP signature