From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 7F20CFEB for ; Wed, 31 Oct 2018 17:29:03 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1543A218CA; Wed, 31 Oct 2018 12:29:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 31 Oct 2018 12:29:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=CgRDVv8gMK 40m65vWVHrYZA22nBcN17wd2X8NSSDKGc=; b=KjFuVLZ9F8l8mJ+O/pXApN3ejo ocwZAy7IVyISKQX8iIl1Hgxvn2NBu/Awt96F1z4Bu4d6ciYfPxGp3gXApfbR6J/3 CxzCsq2AXDVxDEPCTumHd1+yfInc8nb61VIXjCmzPI4Q9QxiiLa4OQWsoGIZbtHj ceetwMdYkyaiQ1ZqE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=CgRDVv8gMK40m65vWVHrYZA22nBcN17wd2X8NSSDKGc=; b=UUB5Ixzk lrwKVu5UXs08aKha8rRNfeU1gX77ba16ctY1w3KfaZtEEtJXhdvgmdkeRQr/HIg7 ts3DtSmKnua20faruQlCcXhiPtcYEjOWbtGzGhBkHEXsv8nQLhd1sBymhjKNo2jI 4LdP0ezAemCjx6XEQqWKGpHeiI1+0Wmmq0qRDsdrkW1KynAvlBVgmTeWqb9G127x qj+yS7TN0T/Bwoy5EwYauD1Fv60NBYdTtLhx92xNEnV2fqaBrK6x5o43F5P7bjVF Hf4CCzO7WipMMwtVezutuRcFj3VMoc7teTz3AHWDraCy5BiDowId4jvSTq0l6IuA 76GrE8iqHsqyFA== X-ME-Sender: X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 4380EE4624; Wed, 31 Oct 2018 12:29:01 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: john.mcnamara@intel.com, marko.kovacevic@intel.com, Arnon Warshavsky Date: Wed, 31 Oct 2018 17:28:42 +0100 Message-Id: <20181031162842.19431-1-thomas@monjalon.net> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181031110548.31184-1-thomas@monjalon.net> References: <20181031110548.31184-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] devtools: check wrong svg include in guides X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2018 16:29:03 -0000 Including svg files with the svg extension is a common mistake: .. figure:: example.svg must be .. figure:: example.* So it will work also when building pdf doc with figures converted to png files. A check is added in checkpatches.sh. Signed-off-by: Thomas Monjalon Signed-off-by: Arnon Warshavsky PS: the warning contains the regex. May it be improved? Warning in /doc/guides/nics/mvpp2.rst: are you sure you want to add the following: ::[[:space:]]*[^[:space:]]*\.svg Cc: Arnon Warshavsky --- devtools/checkpatches.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index bf3114f95..fb9e9f76d 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -43,13 +43,21 @@ print_usage () { END_OF_HELP } -check_forbidden_additions() { +check_forbidden_additions() { # # refrain from new additions of rte_panic() and rte_exit() # multiple folders and expressions are separated by spaces awk -v FOLDERS="lib drivers" \ -v EXPRESSIONS="rte_panic\\\( rte_exit\\\(" \ -v RET_ON_FAIL=1 \ - -f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk - + -f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk \ + "$1" + # svg figures must be included with wildcard extension + # because of png conversion for pdf docs + awk -v FOLDERS='doc' \ + -v EXPRESSIONS='::[[:space:]]*[^[:space:]]*\\.svg' \ + -v RET_ON_FAIL=1 \ + -f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk \ + "$1" } number=0 @@ -115,7 +123,7 @@ check () { # fi ! $verbose || printf '\nChecking forbidden tokens additions:\n' - report=$(check_forbidden_additions <"$tmpinput") + report=$(check_forbidden_additions "$tmpinput") if [ $? -ne 0 ] ; then $headline_printed || print_headline "$3" printf '%s\n' "$report" -- 2.19.0