From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=0.1 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 7EA031F670 for ; Sat, 26 Feb 2022 01:37:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229636AbiBZBg5 (ORCPT ); Fri, 25 Feb 2022 20:36:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229655AbiBZBg5 (ORCPT ); Fri, 25 Feb 2022 20:36:57 -0500 Received: from pb-smtp21.pobox.com (pb-smtp21.pobox.com [173.228.157.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D859207A2B for ; Fri, 25 Feb 2022 17:36:20 -0800 (PST) Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id F34F118EAE4; Fri, 25 Feb 2022 20:36:19 -0500 (EST) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=eUIaiM9dnekBTjWLTqLYd/Jvx1au42WnmdcL5f 08ZCE=; b=ajXvYxXOcRWjOHPmqMepQRZQx5FurVxXgAosdh9ez4xJ6c27YPPE8p RfezYFNLUTcjWGbIf+An0NRNxQt7732q7uKPWwmZBBDj7yQzxr8sKGbB6VS+34ct 9rn6Tioy0KhcnSlqvqE4Ai/AjtTA3HWhPxD9fNmkGf+nTl5KZgoAs= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id EAAE218EAE3; Fri, 25 Feb 2022 20:36:19 -0500 (EST) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.82.80.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 5C86F18EAE1; Fri, 25 Feb 2022 20:36:17 -0500 (EST) (envelope-from junio@pobox.com) From: Junio C Hamano To: Johannes Schindelin Cc: Abhradeep Chakraborty via GitGitGadget , git@vger.kernel.org, =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason , Julia Lawall , Eric Sunshine , Abhradeep Chakraborty Subject: Re: [PATCH v4 2/2] parse-options.c: add style checks for usage-strings References: Date: Fri, 25 Feb 2022 17:36:16 -0800 In-Reply-To: (Johannes Schindelin's message of "Fri, 25 Feb 2022 16:36:30 +0100 (CET)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 7DF996A0-96A4-11EC-854E-CBA7845BAAA9-77302942!pb-smtp21.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Johannes Schindelin writes: >> Add checks to the `parse_options_check()` function to check usage >> strings against the style convention. > > As I just pointed out in > https://lore.kernel.org/git/nycvar.QRO.7.76.6.2202251600210.11118@tvgsbejvaqbjf.bet/, > it seems that replacing the static check presented in v1 by a runtime > check needs to be reverted. Sorry, but I am not sure how that conclusion follows from a breakage in a topic in flight that was discovered by the check. I do not know if a coccinelle based solution is sufficiently easy, simple and robust enough to encourage us to scrap what has already been proposed and reviewed, instead of leaving it as a topic for a future incremental improvement that we can make on top. > In addition to the example I presented, there is another compelling reason > to do so: with the static check, we can detect incorrect usage strings in > all code, even in code that is platform-dependent (such as in > `fsmonitor--daemon`). Yes and no. I would imagine that large enough platforms that have their own conditionally compiled #ifdef/#endif block already have CI to build their conditionally compiled block in practice. I do not see the above as a compelling reason to grow and shift the scope of these two patches. Thanks.