unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: David Bremner <david@tethera.net>
Cc: "notmuch@notmuchmail.org" <notmuch@notmuchmail.org>
Subject: Re: [PATCH v2 2/6] test: more style fixes
Date: Sun, 16 May 2021 13:16:26 -0500	[thread overview]
Message-ID: <CAMP44s02=cB8YjsNkXO6tTi_bnX8RcUjPVwzzopJ-6SHbrj5kQ@mail.gmail.com> (raw)
In-Reply-To: <87y2cezxrv.fsf@tethera.net>

On Sun, May 16, 2021 at 7:08 AM David Bremner <david@tethera.net> wrote:
>
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
> > In order to fit the git coding style.
> >
> > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
>
> 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

  reply	other threads:[~2021-05-16 18:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-15 20:47 [PATCH v2 0/6] test: several cleanups Felipe Contreras
2021-05-15 20:47 ` [PATCH v2 1/6] test: trivial style cleanups Felipe Contreras
2021-05-15 20:47 ` [PATCH v2 2/6] test: more style fixes Felipe Contreras
2021-05-16 12:08   ` David Bremner
2021-05-16 18:16     ` Felipe Contreras [this message]
2021-05-17 11:16       ` David Bremner
2021-05-15 20:47 ` [PATCH v2 3/6] test: emacs: simplify missing dependencies check Felipe Contreras
2021-05-15 20:47 ` [PATCH v2 4/6] test: emacs: check for configured emacs Felipe Contreras
2021-05-15 20:47 ` [PATCH v2 5/6] test: emacs: fix a couple of shellcheck complaints Felipe Contreras
2021-05-15 20:47 ` [PATCH v2 6/6] test: split emacs functionality to its own file Felipe Contreras
2021-05-17 11:17 ` [PATCH v2 0/6] test: several cleanups David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMP44s02=cB8YjsNkXO6tTi_bnX8RcUjPVwzzopJ-6SHbrj5kQ@mail.gmail.com' \
    --to=felipe.contreras@gmail.com \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).