From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [IPv6:2604:1380:4601:e00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id C48311F44D for ; Fri, 5 Apr 2024 22:03:15 +0000 (UTC) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DCFF31F221AF for ; Fri, 5 Apr 2024 22:03:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 84D5717555B; Fri, 5 Apr 2024 22:03:07 +0000 (UTC) Received: from bsmtp5.bon.at (bsmtp5.bon.at [195.3.86.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 27E8D1C6A8 for ; Fri, 5 Apr 2024 22:03:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.3.86.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712354586; cv=none; b=tHDscFKerQMqCijNMbYC1rucO5eE5MGlURLMQnWtoEjsGgi3QfEIyUgCukYSIv3jHmvfAAvTOJ6qQnLLzAyZSpUP3pNei3wb0Q8tzcvfT+anUfxCEONNtY1Cx8kfZU9iljYmPvPNKG3tVLDJzDOHRJr8V9VAQFIz/WvCv0aUFHQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712354586; c=relaxed/simple; bh=p8quWmahFrD9HT9UCiJKS4K5xi4+NUOX6xbgviyoxVU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=h2lGV8rzJRIBWT7GHe1BNZvDTCbA/SQSsJNv4iER7ofpKjpcFSoYgO48TS/XtQhzWg0OV5G4bazf0RQDNY24z/oZsDs3pL9eH0JRtr6tFJFChl43M2Fuzy1KFez16V1coFNAxTLFKMAgz0jZhGrB6GBZQqR/CmdKarCRbnBWmnk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kdbg.org; spf=pass smtp.mailfrom=kdbg.org; arc=none smtp.client-ip=195.3.86.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kdbg.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kdbg.org Received: from bsmtp1.bon.at (unknown [192.168.181.104]) by bsmtp5.bon.at (Postfix) with ESMTPS id 4VBCCj11Spz5v6N for ; Sat, 6 Apr 2024 00:02:57 +0200 (CEST) Received: from [192.168.0.101] (unknown [93.83.142.38]) by bsmtp1.bon.at (Postfix) with ESMTPSA id 4VBCCW5CxvzRnmN; Sat, 6 Apr 2024 00:02:47 +0200 (CEST) Message-ID: Date: Sat, 6 Apr 2024 00:02:47 +0200 Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5] userdiff: better method/property matching for C# To: Steven Jeuris via GitGitGadget , git@vger.kernel.org Cc: =?UTF-8?B?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Jeff King , Linus Arver , Steven Jeuris , Steven Jeuris References: Content-Language: en-US From: Johannes Sixt In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Am 03.04.24 um 23:42 schrieb Steven Jeuris via GitGitGadget: > From: Steven Jeuris > > - Support multi-line methods by not requiring closing parenthesis. > - Support multiple generics (comma was missing before). > - Add missing `foreach`, `lock` and `fixed` keywords to skip over. > - Remove `instanceof` keyword, which isn't C#. > - Also detect non-method keywords not positioned at the start of a line. > - Added tests; none existed before. > > The overall strategy is to focus more on what isn't expected for > method/property definitions, instead of what is, but is fully optional. > > Signed-off-by: Steven Jeuris > Change since v4: > > * Better matching of at least two "words". > * Better handling of generics by restricting commas within < ... >. > * Allow any spaces around commas in generics. > * Because of stricter use of comma, Johannes' identified failing cases > now pass. > * Updated tests to cover all of the above. The proposed patterns look reasonable and are an improvement over the existing patterns, so I think we can move this patch forward. Thank you, -- Hannes