From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751312AbdKUH4M (ORCPT ); Tue, 21 Nov 2017 02:56:12 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:42700 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751185AbdKUH4K (ORCPT ); Tue, 21 Nov 2017 02:56:10 -0500 X-Google-Smtp-Source: AGs4zMbkJJDrOy/mnNLRCF6GOUA9TpZG9d8Wx3EI3UvhaW0i9JcPrdCHHgA+8j51J4otyo2V6n69ug== Message-ID: <1511250967.12439.11.camel@elementarea.net> Subject: Re: [PATCH v2] checkpatch: allow URL >80 chars From: Andreas Brauchli To: Joe Perches , Andy Whitcroft Cc: linux-kernel@vger.kernel.org Date: Tue, 21 Nov 2017 08:56:07 +0100 In-Reply-To: <1511244177.6989.24.camel@perches.com> References: <1511181605.2384.2.camel@elementarea.net> <1511244177.6989.24.camel@perches.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2017-11-20 at 22:02 -0800, Joe Perches wrote: > On Mon, 2017-11-20 at 13:40 +0100, Andreas Brauchli wrote: > > Allow URL to exceed the 80 char limit for improved interaction in > > adaption to ongoing but undocumented practice. > > > > $ git grep -E '://\S{77}.*' -- '*.[ch]' > > > > The patch checks that the URL is indeed on its own line in that it > > allows a maximal prefix of 3 characters to account for a URL after > > a > > comment (e.g. '// https://...') > > I think this part is not necessary or that useful. If it's dropped the line might not be minimal anymore. I.e. there may be content on the same line that could easily be wrapped. > For instance, this style > > /* some long url */ > > is pretty common. I can change the heuristics to not accept word characters outside of the URL match. That would allow whitespace, quotes, braces and comment characters, and thus also the example above. > > As per RFC3986 [1], the URL format allows for alphanum, +, - and . > > characters in the scheme before the separator :// as long as it > > starts > > with a letter (e.g. https, git, f.-+). > > That seems right, thanks. > > > Recognition of URIs without more context information is prone to > > false > > positives and thus currently left out of the heuristics. > > OK. Thanks for the reviews, Andreas