From patchwork Thu Jun 6 08:01:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13687971 Received: from fhigh2-smtp.messagingengine.com (fhigh2-smtp.messagingengine.com [103.168.172.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D4A0139CFC for ; Thu, 6 Jun 2024 08:01:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.153 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717660870; cv=none; b=JePgKLxDb3dnHbPeyfp9n1T2VNc/BOQA1uDYz9zMFSWFPFOGqqrixUMSFsVZkkpjvKWH+w/mqcVg+8Cosw62UCTQTKXDO8DUrU/VxohJzTasOroZ3kfAvrUtfLVRN/QUL8/6rHCeVvVzV9qyFN74s+Zvy+zyCJDni4AgTLaJXV0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717660870; c=relaxed/simple; bh=mUfPl3YcMykXzbX2soTdejmGsZ0omHFjmL8POun+V1s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bX/PApCUQTAB3f5uTh8Ie+CfmMZCD/uXhdqxqYkq8yNB8pMbDHgG/dZdfJBiffSILSNLByBhKbLZSfESACXAXfuvbguoFI/IJ4qQViiW1aabSVwuEjNThdsbWCwFpvwBI5a4Sk9cm5Ly6invUetJE9CtvMjiObYWRYC/9r/Y+zE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=iH0ruZf5; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=lrgmWWQR; arc=none smtp.client-ip=103.168.172.153 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="iH0ruZf5"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="lrgmWWQR" Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id A805B114009E; Thu, 6 Jun 2024 04:01:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 06 Jun 2024 04:01:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1717660864; x=1717747264; bh=lcZK6CPYQ9 VbS/o2CjKBWhVgTJCqi1SHzR/MW4gt2m0=; b=iH0ruZf5o9GDE53L01QKyHaJ3j n5pmh/D3I5Rn17qnisr68OHNf9hq97P9G+REsJTPJerbGJ/DZBHkULyAhJwj5wCD 3hPW7b7BIQvdriyKRrS0OVVZc8Kp+zyXhc1sY4Eb7gxq5vkYpLfW0m3AGWVciHbY siGj2JNh+GysM3RRmf8scQcq/TLgCAv7s6d0UV45zTZRrJjhG/At0XOmJWBdGBVg Rwvhulx1zNO7BeT12ESAK2mi78aqh1ksLTP02T/9iRpOT30Z1FJDpb/B5TEfLwg4 7rf3CDFMHs3Lrgm6ys2XgrsudcWN+07wGaL+D9weuM8DcB46s9n5bRNOWchg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1717660864; x=1717747264; bh=lcZK6CPYQ9VbS/o2CjKBWhVgTJCq i1SHzR/MW4gt2m0=; b=lrgmWWQRKpoYNQAoMpBJviMO376qLPtk8XVFMg2VnknG ZEp2AuF2zY8Aztz3u5/658pUnQksG3banmiwHVjoHCpbw7R57JNu3Pqcrm5cL3QG ohVoki2x9fAep1GgdrGK3khkHyRRlvEFXuHML+RgTShQZdERaXwswoPiIEn2fbfv CpjfLab9CDx+ZIGyZE3CAdC55vKGx1RISZlQ7YntVVdBxbwNcz7o5pDmF2oI3arF dom6/GTVyM2W02Hk7YNKecbq29LDbqEjc6VMCZmJZO3JtAIccoBjolDbGrKaLtcm i/rdu3J0ZQwEx/A9d8lSjpYiOzxDDZvUk5o9VAbIGw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeljedguddvjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrght rhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtth gvrhhnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleff teenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpsh esphhkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Jun 2024 04:01:03 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 2969fea1 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 6 Jun 2024 08:00:33 +0000 (UTC) Date: Thu, 6 Jun 2024 10:01:00 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: James Liu , Junio C Hamano Subject: [PATCH v2 1/4] Makefile: extract script to lint missing/extraneous manpages Message-ID: <489a6eaf2d328044307f38ff23dd35ecc5a4c515.1717660597.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: The "check-docs" target of our top-level Makefile fulfills two different roles. For one it runs the "lint-docs" target of the "Documentation/" Makefile. And second it performs some checks of whether there are any manpages that are missing or extraneous via some inline scripts. The second set of checks feels quite misplaced in the top-level Makefile as it would fit in much better with our "lint-docs" target. Back when the checks were introduced in 8c989ec528 (Makefile: $(MAKE) check-docs, 2006-04-13), that target did not yet exist though. Furthermore, the script makes use of several Makefile variables which are defined in the top-level Makefile, which makes it hard to access their contents from elsewhere. There is a trick though that we already use in "check-builtins.sh" to gain access: we can create an ad-hoc Makefile that has an extra target to print those variables. Pull out the script into a separate "lint-manpages.sh" script by using that trick. Wire up that script via the "lint-docs" target. For one, normal shell scripts are way easier to reason about than those which are embedded in a Makefile. Second, it allows one to easily execute the script standalone without any of the other checks. Signed-off-by: Patrick Steinhardt --- Documentation/Makefile | 4 ++ Documentation/lint-manpages.sh | 83 ++++++++++++++++++++++++++++++++++ Makefile | 36 --------------- 3 files changed, 87 insertions(+), 36 deletions(-) create mode 100755 Documentation/lint-manpages.sh diff --git a/Documentation/Makefile b/Documentation/Makefile index a04da672c6..a3868a462f 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -485,12 +485,16 @@ $(LINT_DOCS_FSCK_MSGIDS): ../fsck.h fsck-msgids.txt lint-docs-fsck-msgids: $(LINT_DOCS_FSCK_MSGIDS) +lint-docs-manpages: + $(QUIET_GEN)./lint-manpages.sh + ## Lint: list of targets above .PHONY: lint-docs lint-docs: lint-docs-fsck-msgids lint-docs: lint-docs-gitlink lint-docs: lint-docs-man-end-blurb lint-docs: lint-docs-man-section-order +lint-docs: lint-docs-manpages ifeq ($(wildcard po/Makefile),po/Makefile) doc-l10n install-l10n:: diff --git a/Documentation/lint-manpages.sh b/Documentation/lint-manpages.sh new file mode 100755 index 0000000000..0abb4e0b4c --- /dev/null +++ b/Documentation/lint-manpages.sh @@ -0,0 +1,83 @@ +#!/bin/sh + +extract_variable () { + ( + cat ../Makefile + cat </dev/null | + sed -n -e 's/.*XXX \(.*\) YYY.*/\1/p' +} + +check_missing_docs () { + for v in $ALL_COMMANDS + do + case "$v" in + git-merge-octopus) continue;; + git-merge-ours) continue;; + git-merge-recursive) continue;; + git-merge-resolve) continue;; + git-merge-subtree) continue;; + git-fsck-objects) continue;; + git-init-db) continue;; + git-remote-*) continue;; + git-stage) continue;; + git-legacy-*) continue;; + git-?*--?* ) continue ;; + esac + + if ! test -f "$v.txt" + then + echo "no doc: $v" + fi + + if ! sed -e '1,/^### command list/d' -e '/^#/d' ../command-list.txt | + grep -q "^$v[ ]" + then + case "$v" in + git) + ;; + *) + echo "no link: $v";; + esac + fi + done +} + +check_extraneous_docs () { + ( + sed -e '1,/^### command list/d' \ + -e '/^#/d' \ + -e '/guide$/d' \ + -e '/interfaces$/d' \ + -e 's/[ ].*//' \ + -e 's/^/listed /' ../command-list.txt + make print-man1 | + grep '\.txt$' | + sed -e 's|^|documented |' \ + -e 's/\.txt//' + ) | ( + all_commands="$(printf "%s " "$ALL_COMMANDS" "$BUILT_INS" "$EXCLUDED_PROGRAMS" | tr '\n' ' ')" + + while read how cmd + do + case " $all_commands " in + *" $cmd "*) ;; + *) + echo "removed but $how: $cmd";; + esac + done + ) +} + +BUILT_INS="$(extract_variable BUILT_INS)" +ALL_COMMANDS="$(extract_variable ALL_COMMANDS)" +EXCLUDED_PROGRAMS="$(extract_variable EXCLUDED_PROGRAMS)" + +{ + check_missing_docs + check_extraneous_docs +} | sort diff --git a/Makefile b/Makefile index 59d98ba688..84e2aa9686 100644 --- a/Makefile +++ b/Makefile @@ -3757,42 +3757,6 @@ ALL_COMMANDS += scalar .PHONY: check-docs check-docs:: $(MAKE) -C Documentation lint-docs - @(for v in $(patsubst %$X,%,$(ALL_COMMANDS)); \ - do \ - case "$$v" in \ - git-merge-octopus | git-merge-ours | git-merge-recursive | \ - git-merge-resolve | git-merge-subtree | \ - git-fsck-objects | git-init-db | \ - git-remote-* | git-stage | git-legacy-* | \ - git-?*--?* ) continue ;; \ - esac ; \ - test -f "Documentation/$$v.txt" || \ - echo "no doc: $$v"; \ - sed -e '1,/^### command list/d' -e '/^#/d' command-list.txt | \ - grep -q "^$$v[ ]" || \ - case "$$v" in \ - git) ;; \ - *) echo "no link: $$v";; \ - esac ; \ - done; \ - ( \ - sed -e '1,/^### command list/d' \ - -e '/^#/d' \ - -e '/guide$$/d' \ - -e '/interfaces$$/d' \ - -e 's/[ ].*//' \ - -e 's/^/listed /' command-list.txt; \ - $(MAKE) -C Documentation print-man1 | \ - grep '\.txt$$' | \ - sed -e 's|^|documented |' \ - -e 's/\.txt//'; \ - ) | while read how cmd; \ - do \ - case " $(patsubst %$X,%,$(ALL_COMMANDS) $(BUILT_INS) $(EXCLUDED_PROGRAMS)) " in \ - *" $$cmd "*) ;; \ - *) echo "removed but $$how: $$cmd" ;; \ - esac; \ - done ) | sort ### Make sure built-ins do not have dups and listed in git.c # From patchwork Thu Jun 6 08:01:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13687972 Received: from fout4-smtp.messagingengine.com (fout4-smtp.messagingengine.com [103.168.172.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C5DBA13C81B for ; Thu, 6 Jun 2024 08:01:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.147 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717660872; cv=none; b=jsrXHULk+IOQG3E2FSte8pjpTbKDVTui57tWgSR6ZZEzSfkQO9SLhtxyJu6G0L9+zM8GMQG7Mokj57FmdBkvKdz9Bh++XGJgT4vx0S7DV5TvN3LtFtkO3GRYK4h6NNPau+E/RdASlo9F1ntJ7F8an/YcY0S6fkku7NtTYMirc5U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717660872; c=relaxed/simple; bh=xHuqFSa0V+tA81ascgkGDC+L15DCOnQZ1aFwe1+yepk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Z3c2WvzPe00sdFL4PKb5KOITnDp70jPFdVJs63QNM8bSrdz5BhzPKw8emZzqBukhoVoxAHw1Bw5u41yvHzxxITS9nIRwascP2XSblpYalAXjHLtDiMlDzfk9n+dJVSuqtMRiYRoFSt//QPZOW38NjLx197ComkdXYYnopVJfgZ4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=G2RAGUUd; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=DoT86jCo; arc=none smtp.client-ip=103.168.172.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="G2RAGUUd"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="DoT86jCo" Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfout.nyi.internal (Postfix) with ESMTP id D80FA13800A2; Thu, 6 Jun 2024 04:01:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Thu, 06 Jun 2024 04:01:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1717660868; x=1717747268; bh=R/8jpItGen nXl2gpotfsuF3qYZJSZLnHZkg/ds4H13g=; b=G2RAGUUd3ZkTasL66jBkhVV6V7 zep/HbxXubFFDFRnoLmPlQAPZUP5wjM/SCbZicmH6LWmheUAk06dlTTPojWDt3ka rY/WZb7S3Ou78l2x4njNHAcerh23WyO7ivJW9rtdUEs+LwQKhwU5Lct6m7qhOgHp CjK2S+Rs5txwAjs2Re1/Tv5Pk0I9OWiS6xgWWcs/EsWEw6/QfSfPg0rCjRURdbfJ sJHhtNpMyOdu90cEqSEdq5Bqv423VhtwYYjBf/vETdkZz+riZ/U8M10zR7cQYjMj grrOFQ7HPG5JuDs1CO+4oR/xDJYDfCFCa/VRK7QHyRT2E4jb/jGKuOxyjhng== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1717660868; x=1717747268; bh=R/8jpItGennXl2gpotfsuF3qYZJS ZLnHZkg/ds4H13g=; b=DoT86jCoEYk1l/fx0wkxgGQGc9to64zuu37sIEqmqxkT RLVqwwARUfsd+GxhP6RO0zRypghKIiCSM6vH4aeg2Q2b5xktIQ7NNEddeyaZamyp FORIm7bseON73iSVVa+MpzX7k+901LW9HPNP3vzhJvX6BVdo6NyqE4yvUQpzXh/X +tJTgket36zyWQgDhxgN0h1Pr5ChA6oCNDhXBxamOA71GWdKcSPfydEN5dFYOANA hsyAQku5yGdcHlQJwcPWmt+VRTlHyCwEb4c5e3TrKohOBM/DqXahJIwZTNAhWekC qvH9Fwbf7OhTu/pp6EBT9R6dILljRzddfBRE4AwWqw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeljedguddvjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrght rhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtth gvrhhnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleff teenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpsh esphhkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Jun 2024 04:01:07 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id fcdfe412 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 6 Jun 2024 08:00:37 +0000 (UTC) Date: Thu, 6 Jun 2024 10:01:05 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: James Liu , Junio C Hamano Subject: [PATCH v2 2/4] Documentation/lint-manpages: bubble up errors Message-ID: <9f21c305b9e0e63ddf1f1b78535f09ae957812d4.1717660597.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: The "lint-manpages.sh" script does not return an error in case any of its checks fail. While this is faithful to the implementation that we had as part of the "check-docs" target before the preceding commit, it makes it hard to spot any violations of the rules via the corresponding CI job, which will of course exit successfully, too. Adapt the script to bubble up errors. Signed-off-by: Patrick Steinhardt --- Documentation/lint-manpages.sh | 41 +++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/Documentation/lint-manpages.sh b/Documentation/lint-manpages.sh index 0abb4e0b4c..92cfc0a15a 100755 --- a/Documentation/lint-manpages.sh +++ b/Documentation/lint-manpages.sh @@ -12,7 +12,9 @@ EOF sed -n -e 's/.*XXX \(.*\) YYY.*/\1/p' } -check_missing_docs () { +check_missing_docs () ( + ret=0 + for v in $ALL_COMMANDS do case "$v" in @@ -32,6 +34,7 @@ check_missing_docs () { if ! test -f "$v.txt" then echo "no doc: $v" + ret=1 fi if ! sed -e '1,/^### command list/d' -e '/^#/d' ../command-list.txt | @@ -41,11 +44,15 @@ check_missing_docs () { git) ;; *) - echo "no link: $v";; + echo "no link: $v" + ret=1 + ;; esac fi done -} + + exit $ret +) check_extraneous_docs () { ( @@ -61,15 +68,19 @@ check_extraneous_docs () { -e 's/\.txt//' ) | ( all_commands="$(printf "%s " "$ALL_COMMANDS" "$BUILT_INS" "$EXCLUDED_PROGRAMS" | tr '\n' ' ')" + ret=0 while read how cmd do case " $all_commands " in *" $cmd "*) ;; *) - echo "removed but $how: $cmd";; + echo "removed but $how: $cmd" + ret=1;; esac done + + exit $ret ) } @@ -77,7 +88,21 @@ BUILT_INS="$(extract_variable BUILT_INS)" ALL_COMMANDS="$(extract_variable ALL_COMMANDS)" EXCLUDED_PROGRAMS="$(extract_variable EXCLUDED_PROGRAMS)" -{ - check_missing_docs - check_extraneous_docs -} | sort +findings=$( + if ! check_missing_docs + then + ret=1 + fi + + if ! check_extraneous_docs + then + ret=1 + fi + + exit $ret +) +ret=$? + +printf "%s" "$findings" | sort + +exit $ret From patchwork Thu Jun 6 08:01:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13687973 Received: from fout4-smtp.messagingengine.com (fout4-smtp.messagingengine.com [103.168.172.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3652713D2A4 for ; Thu, 6 Jun 2024 08:01:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.147 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717660877; cv=none; b=XTNQKmcxkO/4pl4ugWXm3GXr0wMtriAFp3bYneeGZwYbydIgN/v42wxF5e3uz7FtmYjsubAcQ+PtYrsXMaVsM9RHGro5L9F2RaT8pGCzuxA71DRSF/nyY1f2K09Z6wkeXtfOPv8gUg2SXy5jOERmbu+o5vCOYLdNyoOLGIvWSac= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717660877; c=relaxed/simple; bh=/DUChj8jSyEDoy9MZKHYdXG8m4yZzrlL8o+xzKZjxeM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KdRhjaaKBE+jeDEafDr4LjSJ2SYxZuLaODQeo67l2loHXl4lBsXYR3kPuBWfSd7nElvnRcnfdWOZiNVP2Oxing0TbxhzZGVIIoTYqGe0eDo7jGWKxNvYry/pmymN7OYIm98RvTsb7UbhH4M/GgJmlp6CDxZa9ZjVgJhv6XvQ138= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=UE3jBAbb; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=ODN3DbU9; arc=none smtp.client-ip=103.168.172.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="UE3jBAbb"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="ODN3DbU9" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id 51AB01380114; Thu, 6 Jun 2024 04:01:14 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 06 Jun 2024 04:01:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1717660874; x=1717747274; bh=N6mmtVu9q+ gdATPS1RbBYm3U/hc/yIqsopF3O43JriM=; b=UE3jBAbbxNL4CzMGPVlvE5NxlM yIr6Af7Zzxp1KQ5usn243fvzmBr73rWXt/Q69oTTFIFpawW3niT3BwGo7Zo+115+ e22AWI4zA00nII/k3HXdqjXUGeViJcDdH8LIbHeKBZ6xLewS4aFADMNGGTOP+XjE k2CnfZibUtKPoIqdglGZz03ysXWl/REw3RXfHYKcgJ7gdk+FJaZwql6zgOognwxH TQPbSmFgda24rlX2gQ14ETXwkak2azyVPE28oJDPMFbmW+uYUdibhBHQv+1lLUKC cIUR8X7HkFve8t5sSGuVvL3fUzRQxHiaAxpcztaQ/+P2tXmDRdflElm/uICg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1717660874; x=1717747274; bh=N6mmtVu9q+gdATPS1RbBYm3U/hc/ yIqsopF3O43JriM=; b=ODN3DbU9ZmlyowyAmwSvN5yOh7Xa5QaGSbcmQ34vgHOa NYfMIen84HWygZgZtN/J4qlNVlN0GQcCLO07pQNsTQ7/EHW/SZbHty3/UPOEA+Re Nxht/P2TtkRMwRUqSuzBQ/MREJvj7KLrsrZJX/k+oXfJKxB87KxiX53kkcQNBtUZ M7MEWE2L1W1142pdj0s60h0efoxeGjs0WzB0anv+xSPvp8soAS4yMQZFb8ewwpKo OMdqxk0cC5/mRdJ8XZhfRG9P3W1uRhJ6I2971bIpxYpyxGgzk/DWBCHCZokailMb dWzxlyDsr9CpuIAY6tZyum20qDLVVMwMmGzHQuGppA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeljedguddvjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrght rhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtth gvrhhnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleff teenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehpsh esphhkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Jun 2024 04:01:13 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 198eea69 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 6 Jun 2024 08:00:42 +0000 (UTC) Date: Thu, 6 Jun 2024 10:01:10 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: James Liu , Junio C Hamano Subject: [PATCH v2 3/4] gitlab-ci: add job to run `make check-docs` Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Add another job to execute `make check-docs`, which lints our documentation and makes sure that expected manpages exist. This job mirrors the same job that we already have for GitHub Actions. Signed-off-by: Patrick Steinhardt --- .gitlab-ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f676959ca0..37b991e080 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -122,3 +122,12 @@ check-whitespace: - ./ci/check-whitespace.sh "$CI_MERGE_REQUEST_TARGET_BRANCH_SHA" rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + +documentation: + image: ubuntu:latest + variables: + jobname: Documentation + before_script: + - ./ci/install-dependencies.sh + script: + - ./ci/test-documentation.sh From patchwork Thu Jun 6 08:01:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13687974 Received: from fhigh2-smtp.messagingengine.com (fhigh2-smtp.messagingengine.com [103.168.172.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7307113A898 for ; Thu, 6 Jun 2024 08:01:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.153 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717660880; cv=none; b=WuTxYhCixiC8MCkDJl1NW0M0+Qq/5Elacd1jHYRs0TWOxN45u3XwuyFzBENO+fyXw2TOMYBmtAty760QMnmPtTLIW/spkc3zRqSbVbppyVoiPLYq7G1SR6M9FSj5WHvETkYJDgDVOfXoQcN8dQYbgIBIFn/tszrsxG8b8IJhN40= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717660880; c=relaxed/simple; bh=hDczqB6exrPwW8XHqamgecKeqcKNKtzSw7LAYfMcK3k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=n62Rjjn7HnQkmmyjTvLTjMYFcWnSXx6Sp7K+ZV39eSY44gL2nAZog0Pny4ta+Mf0+9EhtKzSzWkgTWvem+n2lxP4IatUuyyJ7yQ6JcHrSZmu9BBUfYsqxFC15O3PkQSw7i2YvuB/U2T0BpgVxXLNgYiNS6w3MMrWvDQBQ/EcKWQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=RGEGaxCC; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=oQtmAeXX; arc=none smtp.client-ip=103.168.172.153 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="RGEGaxCC"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="oQtmAeXX" Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 98C6411400BF; Thu, 6 Jun 2024 04:01:18 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 06 Jun 2024 04:01:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1717660878; x=1717747278; bh=mlSqQsQOeK wVHu0oNI7QyNheH1Gmrd4Tsw0R2SIhrNw=; b=RGEGaxCCXaYk8nBPoxeDEz2A2J cTJHrAx1db4IvHbowO5Vb/sPbS4e0/xnlcoBfUQtfDJG7mXmY1Dpy7NOYClpFy0M iwojnvsB4n7cDaOBlYHKgxb1vVqBgJZ6c53eSIXzdk5qkHXW71D+Q5+MRLCFlBNT 0oTf00mvOc8OyqZ08rSY7sUfTznOeW+FG8+2r0CJz1y77r5eikiziNVL0TC+1FZg 5uLv+bQ/59ZOc5q76QCZieJIMOlX0B2h4+VSK1IUCWCIYhXBNYdxsTVI6jSg6cv7 Ziss9xWZ0BKceei2zN8tqccUsRXKqJKXVJUl2l4H6310tsXKgIftE7Xyop/w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1717660878; x=1717747278; bh=mlSqQsQOeKwVHu0oNI7QyNheH1Gm rd4Tsw0R2SIhrNw=; b=oQtmAeXXNGJBbCaQgtVWkXEFMeo+LXOc1w7yc6TUipdt H/8YzHoMno2fAriKPmjpl3bT4Axcu6OL5/kq5E+Xad2oy68DwwWvWY55tzkNYv0l 3ydOx/6S5C3H1JFe7KJF3HxKRSbbiTeJ4mMRdamJVTF0PK2jhkq/1wTKUclSkU06 VBtX+3gX8SI+D+JU2Cpoz3J8W6pEFfEDS/nCO8Jx3N1sSUo0iEuW1IISDDGHuVL3 fSI7FpEuEUrg91fd1X8uodGG3sKViwKzuaVzYI1ZXfBM4huIt2STAFKRkZ+48229 7VrpflvTEDXjf1czd9faVqv8YZ80nxFaP3LmIiz6BA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeljedguddvjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrght rhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtth gvrhhnpeevtdegieeutefgtefftefgfeelveelgedttddttdegteeiudeuvdevtdeujeel teenucffohhmrghinhepphihthhhohhnrdhorhhgpdhgihhthhhusgdrtghomhdprhgvrg gumhgvrdhmugenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehpshesphhkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Jun 2024 04:01:17 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 7085fd9e (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 6 Jun 2024 08:00:46 +0000 (UTC) Date: Thu, 6 Jun 2024 10:01:14 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: James Liu , Junio C Hamano Subject: [PATCH v2 4/4] ci/test-documentation: work around SyntaxWarning in Python 3.12 Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: In Python 3.6, unrecognized escape sequences in regular expressions started to produce a DeprecationWarning [1]. In Python 3.12, this was upgraded to a SyntaxWarning and will eventually be raised even further to a SyntaxError. We indirectly hit such unrecognized escape sequences via Asciidoc, which results in a bunch of warnings: $ asciidoc -o /dev/null git-cat-file.txt :1: SyntaxWarning: invalid escape sequence '\S' :1: SyntaxWarning: invalid escape sequence '\S' This in turn causes our "ci/test-documentation.sh" script to fail, as it checks that stderr of `make doc` is empty. These escape sequences seem to be part of Asciidoc itself. In the long term, we should probably consider dropping support for Asciidoc in favor of Asciidoctor. Upstream also considers itself to be legacy software and recommends to move away from it [2]: It is suggested that unless you specifically require the AsciiDoc.py toolchain, you should find a processor that handles the modern AsciiDoc syntax. For now though, let's expand its lifetime a little bit more by filtering out these new warnings. We should probably reconsider once the warnings are upgraded to errors by Python. [1]: https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals [2]: https://github.com/asciidoc-py/asciidoc-py/blob/6d9f76cff0dc3b7ca21bdd570200f8518464d99b/README.md#asciidocpy Signed-off-by: Patrick Steinhardt --- ci/test-documentation.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/test-documentation.sh b/ci/test-documentation.sh index de41888430..02b3af3941 100755 --- a/ci/test-documentation.sh +++ b/ci/test-documentation.sh @@ -11,6 +11,7 @@ filter_log () { -e '/^ \* new asciidoc flags$/d' \ -e '/stripped namespace before processing/d' \ -e '/Attributed.*IDs for element/d' \ + -e '/SyntaxWarning: invalid escape sequence/d' \ "$1" }