Re: [Jsonpath] Trailing whitespace (Re: PR regarding selectors ...)

Glyn Normington <glyn.normington.work@gmail.com> Sat, 12 June 2021 06:56 UTC

Return-Path: <glyn.normington.work@gmail.com>
X-Original-To: jsonpath@ietfa.amsl.com
Delivered-To: jsonpath@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 181603A214A for <jsonpath@ietfa.amsl.com>; Fri, 11 Jun 2021 23:56:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aBFU0Yj06ng5 for <jsonpath@ietfa.amsl.com>; Fri, 11 Jun 2021 23:56:27 -0700 (PDT)
Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 96F823A214C for <jsonpath@ietf.org>; Fri, 11 Jun 2021 23:56:27 -0700 (PDT)
Received: by mail-pj1-x1035.google.com with SMTP id z3-20020a17090a3983b029016bc232e40bso7216805pjb.4 for <jsonpath@ietf.org>; Fri, 11 Jun 2021 23:56:27 -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:content-transfer-encoding; bh=JUEuMBpi6xGNAMiNYdEbdXfZVhz1H1cLWSXU4UpvM1g=; b=J2sK0qzChbjGN6O5ec7Mm4XsBZzAvxjdm0SphjgX7+xH0qzyteJ8K4MIXfF8KEVMzp ZRFvtYFzRyMk11jXLBNYd/gucD9w4wvo6+xBMiV43gLnJg6NSuKoxVs9rUTTponBiaun z7oB51gVPQOS96bOtiEAg4byJVmmS3vomlF5CaWRXCh8GJciy/ImRWeFJu/kKPZDuEOi O+b2jTmJXb9D2jXMLzNOXpi3As9W8GUn0SGfjJ/oI4MtCnDum8PUjIsYDixdZ6bAqHTG SlPQmhtX9RE8uWrbXHBTxhSUDpmxi0g8bKwJbGv6z6jjEANPwrip9SA76BaGYFz7yugK fJYQ==
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:content-transfer-encoding; bh=JUEuMBpi6xGNAMiNYdEbdXfZVhz1H1cLWSXU4UpvM1g=; b=BL8SK7AQ+2HkJhVoOTyMZt7SgukPD5YMiz2vQk5GcPQYM1Bp8RTrWTda2oUmaYuBTK se4Toq8TdN6+5YwSvE2g+oiXTSO7rSjL+HsIoGTPP5CdeCeEjCm1H0jRobXoSxOY3ImQ kMCnh1el1hXskJ3PLAbaM9/NzJAS4jis7mBsSrLpxfPzBw5O/kKffmOFvZfbbQtowaS8 rPc8NAgaefywL17iKC9U6rhANMnU4XayGA4V4J12artpAqqT9z+fEwvOPsNkKWz/EDQ6 zBbmOCLbXzYhMzQzO8OqJPtp7xTCv8GBuRBwKD+0r4r8+tqejQjvTXkCvmgYEw5uxQpM KDYw==
X-Gm-Message-State: AOAM533jbEMsThpPb+Mqx6N73R5DfHr++fP1EbkUViYiik/s6aYIYfsq etE63fbbK5MsswRv+Em5F7I+kn8FS3YDS5HPkzF+sc5O868=
X-Google-Smtp-Source: ABdhPJwXb/hkOEfjZS5p4CTgwcUbrZzaVsEgGGQLbTRnNNqcmYNeybQ0ad1koiMr2GcioUZSSMwXO4yzkLBxwq41XYQ=
X-Received: by 2002:a17:902:ee4c:b029:10e:f98c:2b83 with SMTP id 12-20020a170902ee4cb029010ef98c2b83mr7303582plo.62.1623480986408; Fri, 11 Jun 2021 23:56:26 -0700 (PDT)
MIME-Version: 1.0
References: <4061cd79-10d9-f49f-ee0e-c4b5c8b5c69c@goessner.net> <F8595196-876B-42C0-BF2B-FEAB913DD36C@tzi.org> <216567A7-3F08-437F-9793-B773AB0E82F7@tzi.org> <5760e12a-2b9d-8a56-82e2-8488e0f55b08@goessner.net> <DF5D3D6B-0DE6-496D-B1A1-19D560C0339C@tzi.org>
In-Reply-To: <DF5D3D6B-0DE6-496D-B1A1-19D560C0339C@tzi.org>
From: Glyn Normington <glyn.normington.work@gmail.com>
Date: Sat, 12 Jun 2021 07:56:15 +0100
Message-ID: <CANH0GbLtQwtJd0sLY4vC9jnpoYG8zXt8DdX7ba4GTf3HR8Fkqw@mail.gmail.com>
To: Carsten Bormann <cabo@tzi.org>
Cc: Stefan Gössner <stefan@goessner.net>, jsonpath@ietf.org
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/jsonpath/FWuFRXX5yq82RL_d32BYK87dUaQ>
Subject: Re: [Jsonpath] Trailing whitespace (Re: PR regarding selectors ...)
X-BeenThere: jsonpath@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: A summary description of the list to be included in the table on this page <jsonpath.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jsonpath>, <mailto:jsonpath-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jsonpath/>
List-Post: <mailto:jsonpath@ietf.org>
List-Help: <mailto:jsonpath-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jsonpath>, <mailto:jsonpath-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 12 Jun 2021 06:56:33 -0000

Agreed. That's one of the reasons we introduced an .editorconfig file,
which contains the setting:

trim_trailing_whitespace = true

To find out how to apply .editorconfig to your editor or IDE, please
see CONTRIBUTING.md.

On Fri, 11 Jun 2021 at 22:04, Carsten Bormann <cabo@tzi.org> wrote:
>
> On 11. Jun 2021, at 07:31, Stefan Gössner <stefan@goessner.net> wrote:
>
>
> There also was trailing whitespace.)
>
>
> hmm .. . this is important to avoid.
>
>
> Unfortunately, giving a meaning to trailing whitespace is one of the big blunders that John Gruber made when defining markdown.
>
> Kramdown-rfc plays along, but the whole thing is so error-prone that Martin Thomson created a commit hook that stops you from committing changes that introduce trailing whitespace.
>
> Which maybe is a reasonable thing to do, but it creates an interesting failure situation:
> Somebody manages to sneak in a commit that does create trailing whitespace.
> If somebody tries to edit the document updated with that commit, they can’t commit their changes because the commit hook doesn’t let them commit.
>
> Of course, modern editors have easy ways to get rid of trailing whitespace (M-x delete-trailing-whitespace RET in emacs), but the next committer
> (1) first has to diagnose the problem
> (2) needs to find that command that they may not need too often
> (3) litters their PR with all those whitespace changes because they'd lose the changes in the working copy otherwise.
>
> I don’t know a way to avoid trailing whitespace that doesn’t have that problem, or I would already have suggested that change to Martin.
>
> TL;DR, yes, let’s please avoid committing trailing whitespace.
>
> Grüße, Carsten
>
> --
> Jsonpath mailing list
> Jsonpath@ietf.org
> https://www.ietf.org/mailman/listinfo/jsonpath