* [PATCH proxmox-perltidy] drop blank lines directly after opening block brace
@ 2026-11-26 8:55 Dominik Rusovac
0 siblings, 0 replies; only message in thread
From: Dominik Rusovac @ 2026-11-26 8:55 UTC (permalink / raw)
To: pve-devel
the consensus seems to be that the absence of blanks right after the
opening brace of a block should be enforced [0]
use --keep-old-blank-lines-exceptions='{b' to ignore such blanks when
reading the input, so they are removed from the output; by default this
only applies to `sub` blocks. to cover all block types, also set
--blank-lines-after-opening-block-list='*'
to avoid inserting blanks after the opening brace of the covered block
types, explicitly set --blank-lines-after-opening-block to its default
of 0
--keep-old-blank-lines-exceptions needs perltidy >= 20250214, which
however adds no new requirement, since --cuddled-paren-brace-weld
already needs 20250311.05
[0] lore.proxmox.com/all/20261119124402.1822168-1-d.rusovac@proxmox.com/T
Signed-off-by: Dominik Rusovac <d.rusovac@proxmox.com>
---
src/perltidyrc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/perltidyrc b/src/perltidyrc
index ee2ad46..5161cae 100644
--- a/src/perltidyrc
+++ b/src/perltidyrc
@@ -68,6 +68,9 @@
--keep-old-blank-lines=1 # keep old blank lines if the amount is smaller than max. consecutive below
--maximum-consecutive-blank-lines=1 # hard-code the default
+--keep-old-blank-lines-exceptions='{b' # drop blank lines directly after an opening block brace, needs perltidy >= 20250214
+--blank-lines-after-opening-block-list='*' # apply the above to all block types, not just subs
+--blank-lines-after-opening-block=0 # hard-code the default, never insert blank lines after an opening brace
# Control structure formatting
--cuddled-blocks # avoid extra line for else, elsif, ...
--
2.47.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-26 8:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26 8:55 [PATCH proxmox-perltidy] drop blank lines directly after opening block brace Dominik Rusovac
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.