From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 041DE1FF0B6 for ; Thu, 26 Nov 2026 09:55:21 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 273D8216EF; Thu, 26 Nov 2026 09:55:18 +0100 (CET) From: Dominik Rusovac To: pve-devel@lists.proxmox.com Subject: [PATCH proxmox-perltidy] drop blank lines directly after opening block brace Date: Thu, 26 Nov 2026 09:55:01 +0100 Message-ID: <20261126085501.1026600-1-d.rusovac@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795683312072 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.023 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: NNPCZ4QF3T4CO45M5C3DD5QPO7NP5MEW X-Message-ID-Hash: NNPCZ4QF3T4CO45M5C3DD5QPO7NP5MEW X-MailFrom: d.rusovac@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- 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