From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03DF7C433DF for ; Mon, 22 Jun 2020 17:29:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DEA652073E for ; Mon, 22 Jun 2020 17:29:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730020AbgFVR32 (ORCPT ); Mon, 22 Jun 2020 13:29:28 -0400 Received: from smtprelay0251.hostedemail.com ([216.40.44.251]:60360 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729605AbgFVR31 (ORCPT ); Mon, 22 Jun 2020 13:29:27 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay07.hostedemail.com (Postfix) with ESMTP id 4DE6318026A02; Mon, 22 Jun 2020 17:29:26 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: need47_4e04c3f26e34 X-Filterd-Recvd-Size: 3750 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf20.hostedemail.com (Postfix) with ESMTPA; Mon, 22 Jun 2020 17:29:22 +0000 (UTC) Message-ID: Subject: Re: [PATCH] Replace HTTP links with HTTPS ones: Documentation/process From: Joe Perches To: Miguel Ojeda , Jonathan Corbet Cc: "Alexander A. Klimov" , Randy Dunlap , Tony Fischetti , Chris Packham , Mauro Carvalho Chehab , Nick Desaulniers , "Jason A. Donenfeld" , Arnd Bergmann , Andrew Morton , Borislav Petkov , Will Deacon , "Chang S. Bae" , Pankaj Bharadiya , Kees Cook , Geert Uytterhoeven , Jacob Huisman , Federico Vaga , Jonathan =?ISO-8859-1?Q?Neusch=E4fer?= , Konstantin Ryabitsev , Linux Doc Mailing List , linux-kernel , clang-built-linux Date: Mon, 22 Jun 2020 10:29:20 -0700 In-Reply-To: References: <20200621133630.46435-1-grandmaster@al2klimov.de> <20200622070623.086f1623@lwn.net> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.2-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2020-06-22 at 19:03 +0200, Miguel Ojeda wrote: > On Mon, Jun 22, 2020 at 3:06 PM Jonathan Corbet wrote: > > As has been noted elsewhere, checkpatch.pl seems like the appropriate > > place to make this check. As for "the entire tree"...if this job gets > > completed, "git grep" should be a fine way to do that. > > `checkpatch` is not really enforced in many subsystems, no? Further, > some existing and future HTTP links may support HTTPS later on. > > As for `git grep`, agreed if we reach near 100%. Otherwise, no. In the > general case, including the code for a task that has some likelihood > of needing repetition is a safe bet, which is why I suggested it. The > same script could be also used to check for broken links and related > maintenance. scripts/get_maintainer.pl --self-test=links has a reachability test using wget. Perhaps a script like that could be used for http:// vs https:// ## Link reachability } elsif (($type eq "W" || $type eq "Q" || $type eq "B") && $value =~ /^https?:/ && ($self_test eq "" || $self_test =~ /\blinks\b/)) { next if (grep(m@^\Q$value\E$@, @good_links)); my $isbad = 0; if (grep(m@^\Q$value\E$@, @bad_links)) { $isbad = 1; } else { my $output = `wget --spider -q --no-check-certificate --timeout 10 --tries 1 $value`; if ($? == 0) { push(@good_links, $value); } else { push(@bad_links, $value); $isbad = 1; } } if ($isbad) { print("$x->{file}:$x->{linenr}: warning: possible bad link\t$x->{line}\n"); }