From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 24014C1316 for ; Mon, 15 Jan 2024 10:28:58 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id F2C8F18B12 for ; Mon, 15 Jan 2024 10:28:27 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Mon, 15 Jan 2024 10:28:27 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 1A4D64508B; Mon, 15 Jan 2024 10:28:27 +0100 (CET) From: Stefan Lendl To: Thomas Lamprecht , Proxmox Backup Server development discussion In-Reply-To: References: <20240112144328.353398-1-s.lendl@proxmox.com> Date: Mon, 15 Jan 2024 10:28:26 +0100 Message-ID: <87zfx7hrnp.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-SPAM-LEVEL: Spam detection results: 0 AWL 0.034 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: Re: [pbs-devel] [RFC v2 proxmox-backup] git-hooks: pre-commit runs cargo fmt --check X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jan 2024 09:28:58 -0000 Thomas Lamprecht writes: > Am 12/01/2024 um 15:43 schrieb Stefan Lendl: >> * add a pre-commit hook that declines commiting if cargo fmt would make > > as said off-list I do not want anything that blocks committing, > that is a PITA in development especially as this doesn't gains us > much... so NAK! It's easy to overwrite the checks when committing with `git commit --no-verify` > > Let's rather add a fmt --check test to the buildbot, then we get > pinged on issues and a maintainer can just commit and push a cargo > fmt run without that much fuzz.. > I agree adding a fmt check to a CI make absolute sense. As of now the buildbot is not triggered when sending a patch series. So the user will not get feedback. Guarding locally against not-formatted commits, prevents user from sending these patches in the first place. The intent was to ensure style compliance BEFORE sending a patch series and not relying on a manual feedback process to identify this. Once a CI is ready, this could and should be done in the CI.