Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp37341ybi; Wed, 29 May 2019 16:12:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwRnvVmO5+ylOob8sWbvP26MxDG1dzTmH64CRDsx/RdfCAXlgYj+YRq+49XWuqbkx9Q6lrP X-Received: by 2002:a62:3605:: with SMTP id d5mr278701pfa.28.1559171531526; Wed, 29 May 2019 16:12:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559171531; cv=none; d=google.com; s=arc-20160816; b=i0JoBMmDYqDLkS5R0wSureH+utDwrobgSONW6BPrV5lXiASCHpfGjHPHxwe2XhKJ/X M1hpicoz7Uw0+oH5cXPHO/XjCP9r+9wTJag+ZGfpSjPPLrhwHX/wMM8Zy01rGSfYwYjL j6a+UizP2KPK504I66839rk/yC4kYwqKn1zNpsteJvDLv+W7T3qCvHWcpKaUFhfmKhLD BQ1JL+J2gUYPgFEo4cZuROSWQAlHFjxnnkRLwYNv1x0puSxadGhUvKfX8U2mUm31QfXc 8CkvrkYg/ahExJGr5l79ayQSB4/4BkiCmTVvzCpUst4gqqd06XOv0nIxnKR7+FYybIm4 6wpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wCq8wzGw72uiJf8YTianNOUvn6pWVH3JtoQXOBTmG7c=; b=vAAkJ2MIQZovVPCKKGhvZhsDGSOlszWbdDLur52tJzK5VUzU85X3qRJfLzh/t4G2EZ hGHjVt2qqK7MM1vZquj/mx5kcHZ8Jz0o+JxXLnpyBYlH1YEtjmPqWIjI91lbzelfsBxD K9CHXfK29ae5Pg+jFAs/nMLxSwzy2Whk4AmVqKjHfGm0VYtG42+vXrFIB35Vuq2bHeTI Tz+ZF5wN/xh5bbi9xBmFlBJfqJyzuN4r9Ua/m/mvhMWyIbA8zl7PzgdZAmQ1O/qk6NJn ZruqJXxeq/Tt4uE9AMfUAVCEdvZSrRakLCxVXosZt8/kagzoH9HT6EMOXmmvYYh+vaa1 QcyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=KZCCgVwN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1si1031355pll.317.2019.05.29.16.11.56; Wed, 29 May 2019 16:12:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=KZCCgVwN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726735AbfE2XJj (ORCPT + 99 others); Wed, 29 May 2019 19:09:39 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:47594 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726462AbfE2XJh (ORCPT ); Wed, 29 May 2019 19:09:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=wCq8wzGw72uiJf8YTianNOUvn6pWVH3JtoQXOBTmG7c=; b=KZCCgVwN4/7fZXkfXyahTcPfB5 3vhvf4VTIFFeMlZJwPJfA1oZnu5+f5FuDlqP0g0ygvsdXV94pvM5B8GtuA0wpT3P+TDBhYOAVqhcm QEjo0whAHRLFsap3aLw2XaqO8yecfweB28Px+qnx10+yX7H+aTXt5C1pYejj3gyf8EHNirKzwD8IA GYQ0cG+IAs1XUgrCatNeRDdkrmakdWI3S/+S0TOh+tlRy9N4EokGZ0s79/r6g7JS8AFpfWdlwvckb xrjQrozrcnGrrUZmEuJTqmfAv12NlVc6BN4nSXaAy62c+XdD18O67UAVSB47tYj3zCscfvUOs9qDG dUG04c0Q==; Received: from 177.132.232.81.dynamic.adsl.gvt.net.br ([177.132.232.81] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hW7hQ-0000lF-GZ; Wed, 29 May 2019 23:09:36 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92) (envelope-from ) id 1hW7hN-0007Td-Lw; Wed, 29 May 2019 20:09:33 -0300 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet Subject: [PATCH 06/10] scripts/documentation-file-ref-check: exclude false-positives Date: Wed, 29 May 2019 20:09:28 -0300 Message-Id: X-Mailer: git-send-email 2.21.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are at least two cases where a documentation file was gone for good, but the text still mentions it: 1) drivers/vhost/vhost.c: the reference for Documentation/virtual/lguest/lguest.c is just to give credits to the original work that vhost replaced; 2) Documentation/scsi/scsi_mid_low_api.txt: It gives credit and mentions the old Documentation/Configure.help file that used to be part of Kernel 2.4.x As we don't want to keep the script to keep pinpoint to those every time, let's add a logic at the script to allow it to ignore valid false-positives like the above. Signed-off-by: Mauro Carvalho Chehab --- scripts/documentation-file-ref-check | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/documentation-file-ref-check b/scripts/documentation-file-ref-check index 6b622b88f4cf..05235775cc71 100755 --- a/scripts/documentation-file-ref-check +++ b/scripts/documentation-file-ref-check @@ -8,6 +8,14 @@ use warnings; use strict; use Getopt::Long qw(:config no_auto_abbrev); +# NOTE: only add things here when the file was gone, but the text wants +# to mention a past documentation file, for example, to give credits for +# the original work. +my %false_positives = ( + "Documentation/scsi/scsi_mid_low_api.txt" => "Documentation/Configure.help", + "drivers/vhost/vhost.c" => "Documentation/virtual/lguest/lguest.c", +); + my $scriptname = $0; $scriptname =~ s,.*/([^/]+/),$1,; @@ -122,6 +130,11 @@ while () { next if (grep -e, glob("$path/$ref $path/$fulref")); } + # Discard known false-positives + if (defined($false_positives{$f})) { + next if ($false_positives{$f} eq $fulref); + } + if ($fix) { if (!($ref =~ m/(scripts|Kconfig|Kbuild)/)) { $broken_ref{$ref}++; -- 2.21.0