From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 7AE326DE0B0A for ; Thu, 20 Oct 2016 11:27:11 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.031 X-Spam-Level: X-Spam-Status: No, score=-0.031 tagged_above=-999 required=5 tests=[AWL=-0.154, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, PP_MIME_FAKE_ASCII_TEXT=0.243, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SAkA-dj2AUbe for ; Thu, 20 Oct 2016 11:27:10 -0700 (PDT) Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by arlo.cworth.org (Postfix) with ESMTPS id C7F396DE0173 for ; Thu, 20 Oct 2016 11:27:09 -0700 (PDT) Received: by mail-lf0-f66.google.com with SMTP id l131so1433644lfl.0 for ; Thu, 20 Oct 2016 11:27:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:cc:references:in-reply-to:mime-version:date :message-id; bh=neTyJs+OeBy42reHms9lcmiHQniMNKi45DiCp6qlidE=; b=zgQwi7vYxQ4I2Nzfox3uIm2h5VUGszvniwx/qRzTwHSF2Fc/IPsaqTbYcDeXG2xjnh esc9z4TR6KB+HPScIsEQU0NlhB9gTTVyLSSPuiMuEdpfpe4Y1q+Edgj5gruoJRMvEZng ThDB/fBxfxiYCciZIqEyQT2BwjEaafmlBKD8NpoPq3+yBVFw/cI4m3fiR1jxdgbYOehS F144hXQ+aN7dfxFh3XeJG7PcY3oxO54YdHnAlg0VwYylrcroahIkBOlKbTyRyFFvidoq +QCyjEmkLhFg9f7LZWu2AyRj68yEi0Apdcl7nITjRhibjkBTEzhb7K6wixgm9JUPUP4B vejQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:cc:references:in-reply-to :mime-version:date:message-id; bh=neTyJs+OeBy42reHms9lcmiHQniMNKi45DiCp6qlidE=; b=b34kiqg0DQQ9l5dRJN/q1hT+llTIZBblvkuYTynH33uOHRYGkVJ/+N+4gpZWaLvtma MuIeJXpB0U72VFWZWTxL1a5OkdA1iAony7qjFWOADKn+1o5bqbVTnYW3jTGmjLvF6/Xi ra8TxdNoCNVyZqMjT3NJF71cg4+17yeGAzwdNOtizyX+VR62rWmNGY/CiE7XOL3NMwB6 N4AITJIMCrTAOTd6xKAk63f4DCDksc9C+8R8CZ5rFexWq4brxfLDCVAeXqjsiMDRo727 RnwXMAizKYX0P8rnzZEYCehyoVMSBD4D7z7xOqcnv7jP0eEtL/sPIhi/Kt5cNfhyBdRj wUXA== X-Gm-Message-State: AA6/9RnzNnOkYlORpCVb2G5LWCHAMoQIylgEPe6vlMEiMUokxpYcSskNcJnKnt7MazLDfg== X-Received: by 10.194.119.162 with SMTP id kv2mr1145179wjb.182.1476988027775; Thu, 20 Oct 2016 11:27:07 -0700 (PDT) Received: from localhost (p579BAAAF.dip0.t-ipconnect.de. [87.155.170.175]) by smtp.gmail.com with ESMTPSA id a7sm77695941wjj.22.2016.10.20.11.27.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Oct 2016 11:27:06 -0700 (PDT) From: Franz Fellner Subject: Re: [PATCH] lib/database.cc: fix misleading indentation To: David Bremner , Tomi Ollila , notmuch@notmuchmail.org Cc: tomi.ollila@iki.fi References: <1474988812-21365-1-git-send-email-tomi.ollila@iki.fi> <1.476.968.079-ner-1.779@TP_L520> <87funrrmqb.fsf@tesseract.cs.unb.ca> In-Reply-To: <87funrrmqb.fsf@tesseract.cs.unb.ca> MIME-Version: 1.0 Date: Thu, 20 Oct 2016 18:30:52 +0000 Message-Id: <1.476.988.252-ner-1.022@TP_L520> Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2016 18:27:11 -0000 On Thu, 20 Oct 2016 13:47:40 -0300, David Bremner wrote: > Franz Fellner writes: > > > Probably a little bit off-topic, but somewhat related. > > There is a wild mix of TABs and spaces used for indenting all over the place. > > I had a hard time to follow the code. Could there be done something? > > Do we have some sort of coding style? If not could we agree on some? At least > > for such important things as indentation... It is possible to use e.g. astyle > > to apply the formatting automatically. > > > > Franz > > from devel/STYLE: > > * Indent is 4 spaces with mixed tab/spaces and a tab width of 8. > (Specifically, a line should begin with zero or more tabs followed > by fewer than eight spaces.) >From a quick visual scan at least half the indented lines start with 4 spaces instead of TABS. As I understand the quoted paragraph that should be wrong. > that _should_ be enforced by devel/uncrustify.cfg When was uncrustify used the last time? I simply ran it on lib/database.cc and it produced a diff with 661 lines - the leading spaces were NOT fixed ;) > On the other hand, there are also no doubt places in the code where this > rule is not adhered to. At the risk of being clichéd, whitespace fixup > patches are welcome. Well, I could do it but I won't do it by hand ;) If we can fix the uncrustify.cfg I would be happy to submit patches. > Finally, it might help to have some settings whatever editor you are > using. I'm happy add a file to add a project .vimrc [1] (or whatever editor > people are using) to complement the .dir-locals.el that is there. Instead of using special config files for every editor we could also stick to editorconfig: http://editorconfig.org/