From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2A7ZEpVhoWCKIAAAgWs5BA (envelope-from ) for ; Sun, 16 May 2021 20:16:53 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id YDmFDpVhoWAacgAA1q6Kng (envelope-from ) for ; Sun, 16 May 2021 18:16:53 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (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 aspmx1.migadu.com (Postfix) with ESMTPS id 065D813C49 for ; Sun, 16 May 2021 20:16:53 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id C5A4329004; Sun, 16 May 2021 14:16:47 -0400 (EDT) Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by mail.notmuchmail.org (Postfix) with ESMTPS id 75775271EC for ; Sun, 16 May 2021 14:16:45 -0400 (EDT) Received: by mail-wr1-x430.google.com with SMTP id n2so4188888wrm.0 for ; Sun, 16 May 2021 11:16:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4XYWZvs+42q7xA2jhLguWs2+kyX3BbcHktk+D3f/MDo=; b=Dt77wa655A+9xGAuCkONeOJdy3rXWyEuypUYTuUiCe6kCcl668kmsip4GUnvloowAe qVk+EO36nquX/zqzq3woYKFo4n/nRVQ2MBFUR4m34qJca38LXFN9SfxjH1VSDSpMDReR fHtH0rtQKXMW2dgOBYGzrCNuWULOarFI93Jzdfu54msdWUKCtQPBYrkeMBM46Dwya4u+ 1D6Nim4mDad2ztU2Umv1dmY9SLGdCuQMqz6kCEbfG8P1uX2XhgCf5MBzG/fYUp5KZ/Or JBi+Kz5yTTM740i1CXfITIvYntFtL1N0CJ4YZsPYrSlfMtF9YRbuq1mbo5NEIuMbhh2e UUcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4XYWZvs+42q7xA2jhLguWs2+kyX3BbcHktk+D3f/MDo=; b=ftuZ6u3iDPyuDdegl0NcFQyO1utrnMnU13ekGlJy4hxZSxb/g9UEs5n+PpXQrTPEXi KL7RytfF7CFszfGVJg6oKEC6l27vdAw9EXxHiTPsLwdj5qlsidcgkakQXoDIgX5sFp5t pADSseYaeN43sEyftnCsHHuxxd4JvBEEdmP9orkkSACokfYgXqYDS15v2qsQamBm0Fwy VRBTnhn4tOhArXEzZXWzDkUeyJnmp/X5TL6dVH80HNJok3K3KSZxIuGnOLN6S5KIDmf9 Z4+nmCTubYL197X/78uVj+uApizD7sHGUioAbSRdtWXvSNwJ6e+2oZv3iLl8KRWzrGP9 owRA== X-Gm-Message-State: AOAM530yvXVGFw1bF8mqz5mpuHZ/heVMw/AumTOKVDSwPcxVCVubAVT0 +cpOyV7bfG0Lj3nXca/3nXDgpJflNe1oGcnXoUEmuG+25bifng== X-Google-Smtp-Source: ABdhPJz1ypAWAt7cBGcHSfJbnqs+XX+3YlN2og3K5IhOPI5ww2bEgExJlAjsffVACXcJB3GQbUvkQMIeyn0lenx7+1A= X-Received: by 2002:adf:ee89:: with SMTP id b9mr34100051wro.139.1621188997669; Sun, 16 May 2021 11:16:37 -0700 (PDT) MIME-Version: 1.0 References: <20210515204744.965206-1-felipe.contreras@gmail.com> <20210515204744.965206-3-felipe.contreras@gmail.com> <87y2cezxrv.fsf@tethera.net> In-Reply-To: <87y2cezxrv.fsf@tethera.net> From: Felipe Contreras Date: Sun, 16 May 2021 13:16:26 -0500 Message-ID: Subject: Re: [PATCH v2 2/6] test: more style fixes To: David Bremner Message-ID-Hash: N7CK5MWKEBYMYIW43EEQKQC7O6GWRF5S X-Message-ID-Hash: N7CK5MWKEBYMYIW43EEQKQC7O6GWRF5S X-MailFrom: felipe.contreras@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: "notmuch@notmuchmail.org" X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621189013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=NxUBzkDVoXwesizVbhTccjO9l/oRbLcY8iXBXWgQcpQ=; b=ofdiv9i9PPUkmkLDmP8nA92Gip11K+Ar5fU/L8dloeNOJzs5SK7FTN6n55813R7XjSDWSm BYRoSwsr5lwcfhditUdIyejoBxrelyaVoohovAIMfFy13eHcnh0RxdzGSqkEzdbGtUgQmC u5LA+sF0iz8ip/GU4mhHgNF9FeR7FIdco23uxHyz/H2+fDHP8dz7Mi/ZPTL7OpLFK/R1Nx 7Id/ZF67+6JhXM32XOJxWGKYlApc2zE6vfwKa6LPI8srAbma2MAkoji20Cp/SGG/4STv0u mvZs6715K7Wl49+6qnj9/SJ9YeymrBPcgS1R9NEjxxaQ3sr45XQ/3F0UnZ4/4Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621189013; a=rsa-sha256; cv=none; b=UKOq0cjXCJzQO6NHfVEi/5oyGGE8cu8EyjVkWPtYio+/iJPPjIlVCnaT3rQ+2P9r+ytpXE 6G9RfPSHCc/hnqOTlZ0JB3smyYwPg+JaUdYVET5PnCgEgmPKCq/ycmYzBolj6Oh9ADU8Qr cWOSyZg6Y5uIiP0KGJA8FJeTTDKZAZ9JyjDO5+/d6Iksbz/zU6+6DzlxCAp6ZSUOV3OlCR HtrWe6XgmW8e3pEiWqsCkLGzaAQYD4TCy8pUGFbzyHHvf+2rLfS3CH8UOOgSI7D3xa08v7 JtJblpJi0b+7iSRthsQ5WUPwcxt5iSa4GBewYO73fI7/UVKS3yHmhh7yZRj0aw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=Dt77wa65; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 0.53 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=Dt77wa65; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 065D813C49 X-Spam-Score: 0.53 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8YstSSah1GHx On Sun, May 16, 2021 at 7:08 AM David Bremner wrote: > > Felipe Contreras writes: > > > In order to fit the git coding style. > > > > Signed-off-by: Felipe Contreras > > I personally prefer this style, but I have to point out that the C and > C++ code in the code base (including the Ruby bindings) use the > "brace-on-the-next-line" style. Should we strive for consistency with > the C code, or is there some overriding concern here? I consistently code in C, Ruby, shell, Python, and Javascript. Each one has different idioms, and in each one people tend to have different styles. For example in C people tend to use tabs of 8 spaces, in Python 4, and in Ruby 2. I personally have different styles depending on the language, and I don't know any project that tries to be consistent among languages. The testing framework for example seems to come from the git project, which has a C style of: void function(void) { } But a shell style of: function () { } I may have been spoiled by them, but I like both styles. Additionally the testing framework was split into the sharness project [1], which obviously has the same shell style. BTW, at some point you might want to use sharness, instead of maintaining your own testing framework. So my vote is no: we should not strive with consistency with the C code. The original git shell style is fine, and if we adopt it, we can refer to it in test/README instead of defining our own. Cheers. [1] https://github.com/chriscool/sharness -- Felipe Contreras