From patchwork Wed Jun 5 05:16:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13686152 Received: from wfout7-smtp.messagingengine.com (wfout7-smtp.messagingengine.com [64.147.123.150]) (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 0707A38FB9 for ; Wed, 5 Jun 2024 05:16:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717564614; cv=none; b=cCv8VGdSnrmGhVQUdAI28QHwMDT2gYT6UDlnuU98ddGEeFJUemPx0P9/P2Yy+R4DyQ6ry76VSlF1dOUk9so0Xrlp8dpRh1jBh2uP0Jt/UG1sPfz0fIszZOwXIIi1Fw6rn+xk1XjJ4GhPWDSzffDPnHxEatgcbYOWMJA2Qv8mcCg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717564614; c=relaxed/simple; bh=phMlx17B/ZXe96oAz0ZTN84EpbP8BhhbWwFJ1ovOUuA=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=roSSVOMwIstTlGCg5QEREBj3j+ZEaW496aOjwnSIfaL98VcN/VyErOeOcFbj6a/Y7CJLkupOLsQv8QwbSWZpCxZLzf7wDvVqB5FyWko+k7Lp7iO6S9ViD4X1BnlBspe/YuFIvAFVzQRiTSEHAC/sg5D02pICtqSKoPJ0aXr5OcM= 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=jeFY4rmW; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=f0AMXqt9; arc=none smtp.client-ip=64.147.123.150 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="jeFY4rmW"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="f0AMXqt9" Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfout.west.internal (Postfix) with ESMTP id 304771C0016E for ; Wed, 5 Jun 2024 01:16:51 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 05 Jun 2024 01:16:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=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=1717564610; x=1717651010; bh=qwtZ48+kdg G+ik+Ja7v/177c2DR/CFV631Cdcd8jAFc=; b=jeFY4rmWW5mDwLV3EOoKB4vLmd Tx51MqFd3FzljPpX0OmR4Qt2sc8FfQX+6mk7Gh8CRYhKgwDxOOT8IqQMKfuDyVuf BNCDMm6XD8Dc7UHD+mQp80/j7aDIGRwDnM7mohzUz1M5FOcrAP5PI0syBzXb5VLz CpRTXcvr7jZa/+nxI+9U3krTT8tf0OiQE2ALprpwhJ80bLwTKCHU99xOTQWY+znu LxiY8hxnFlxNWnuOtXxWJz1ossQbQ0SbCW0N/hA6s/EyWDRuVp64L7XqDDE6gFEU 0EKaWrMldN6WycUvhRAVI9wGMxhSTEoA8DdDaPlhAbNsD+M2fti1s8Vw216Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=1717564610; x=1717651010; bh=qwtZ48+kdgG+ik+Ja7v/177c2DR/ CFV631Cdcd8jAFc=; b=f0AMXqt9Cf1fBwvOXHYt+klfmm4wh7z4GDcpODFX8JIE 8DMwMRNozIIGC8y4K4HNbPrfQlO2lnAIB3HndKypC2REsD0jSMAy4FqtuKVZpNo9 JWa2Jjn3Ixkr3uuI3mkIXBsLwGzFhQ33dJSjzv5H2/hJuntMwKDZLnEvtSNYphrV 8skqvHXO+4e1gjbdWQugqaLlUD0knmGmmAUFK2J9ZdAMrUHJ4fibBPVQ1l86FSsQ DUrK44y2kuhfqYDPf1l6q4n6RfjE7bnMfkd6+Dul7hiJik6VhGCQoSxqP+bT8WD7 w+Sm225Oojo8p/arn2N2gG+P4dGXgFwrW5mabvXiNQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdelhedgleefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtvdenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehp khhsrdhimheqnecuggftrfgrthhtvghrnhepheeghfdtfeeuffehkefgffduleffjedthf dvjeektdfhhedvlefgtefgvdettdfhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 5 Jun 2024 01:16:50 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 13b6805c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Wed, 5 Jun 2024 05:16:21 +0000 (UTC) Date: Wed, 5 Jun 2024 07:16:47 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Subject: [PATCH 1/4] Makefile: extract script to lint missing/extraneous manpages 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: 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 | 82 ++++++++++++++++++++++++++++++++++ Makefile | 36 --------------- 3 files changed, 86 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..f720a3f3d6 --- /dev/null +++ b/Documentation/lint-manpages.sh @@ -0,0 +1,82 @@ +#!/usr/bin/env bash + +cd "$(dirname "${BASH_SOURCE[0]}")"/.. + +extract_variable () { + ( + cat Makefile + cat </dev/null | + sed -n -e 's/.*XXX \(.*\) YYY.*/\1/p' +} + +check_missing_docs () { + for v in $BUILT_INS + 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 "Documentation/$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 () { + local commands="$(printf "%s\n" "$ALL_COMMANDS" "$BUILT_INS" "$EXCLUDED_PROGRAMS")" + + while read how cmd + do + if ! [[ $commands = *"$cmd"* ]] + then + echo "removed but $how: $cmd" + fi + 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//' + ) +} + +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 Wed Jun 5 05:16:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13686153 Received: from wfout7-smtp.messagingengine.com (wfout7-smtp.messagingengine.com [64.147.123.150]) (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 6816238FB9 for ; Wed, 5 Jun 2024 05:16:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717564618; cv=none; b=dYP+kFtICFqZFo0luTR8w55P0UEuhyv/Bj2o/WdA5F80AYS7DQchoVaaq/loWza4npjFEDxUZbtyWcIvexM5gEbOROJGKeITrLAX/04P+69vV4GxscyGZl+C9EMFWFoWH80SSaVy03PBbJg8OSM+YwhAi/ze3L0eHxayZg5oU84= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717564618; c=relaxed/simple; bh=2XotbK05F7RrzfIxF9zLmhFF4NhswpD0cNycJoxJpf8=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=F3HPyjgtrAmMHuNIr0+BC0tGi40SHPtfC3XO8CkWJOF5G4p8tsG7xge+mjlgsrHBGti0MzFsIIxGIjDxBR0rLKGg90AqmrQOV0Nrk4pcKwWp3BiQEz5CAD1lDeQIohglBsbPOuJC0xyUMuPzdpkOjGEDQtMmgRwnAcsYnHk1HfA= 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=NqtZdmG4; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=h6PJh/FT; arc=none smtp.client-ip=64.147.123.150 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="NqtZdmG4"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="h6PJh/FT" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.west.internal (Postfix) with ESMTP id 9FAE31C0016E for ; Wed, 5 Jun 2024 01:16:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 05 Jun 2024 01:16:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=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=1717564615; x=1717651015; bh=p66hhxpA8q L2wnLJTKooBS0mrv/6yiO344wLPKNN36E=; b=NqtZdmG4BGFwI0qnOzWwwYW60e ZAeNtqnUCPvwIpfhLO+DX3+GzH8KU8MfzikWLf5413YjI/VGBt9ossS78kk+aG62 fIyIhWpyf4WrqP7s+OQP46k0/NVL8HmY/LvJtdsE1CQBdsQM58tpAqnF+womJnyy 9wgBDE0JXWJ2g99H07uPUG5sbRZa3y1BLBjtCflPqUAH931xcwzpZlkp956dXrqP LFeCBQE1IUIgYD/WTFBw18s34I0jmHN5ZHiUXze8CTPIa7h5uxC3tZW3LIjQkCCu dLAprCwxnUt6n9E+pEtQzCuYqTnPHaJelssYNrn/Gzfmi0MKtU7FASuVpoxQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=1717564615; x=1717651015; bh=p66hhxpA8qL2wnLJTKooBS0mrv/6 yiO344wLPKNN36E=; b=h6PJh/FTZ4YaodLCnNEhwvDl9rlaoZrF25F66MkjCh8r NaYLnYLF3FcHfBOkn8REjl+5oj8GqY0PDCbxIaCxlOkQDIPaOJ32cLFE2S/DAmTC b0+MSyuxzGSb0c1gtVuN5rVXSR3OqitnyeBFhVwYaPHMHrOlTHqlK75Czea8rrTe rjaHvguN4NP8rnhxK5xbqDAHNd+KiCR19aQvlqv+fIUFH05NOMI5aSuncKkd4/C9 WBjDVsMFNEMbL5fMTLOMpmKVj2f+ab+agl2c/sJCo/wTV+Tyuaf78XPHf9whLrfX 5hw1Zum0rtWeGfSd5ztMYbHE3ZYTBWUHQKdPrNI19w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdelhedgleefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtvdenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehp khhsrdhimheqnecuggftrfgrthhtvghrnhepheeghfdtfeeuffehkefgffduleffjedthf dvjeektdfhhedvlefgtefgvdettdfhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 5 Jun 2024 01:16:54 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 39b1207d (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Wed, 5 Jun 2024 05:16:26 +0000 (UTC) Date: Wed, 5 Jun 2024 07:16:51 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Subject: [PATCH 2/4] Documentation/lint-manpages: bubble up errors 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: 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 | 35 +++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/Documentation/lint-manpages.sh b/Documentation/lint-manpages.sh index f720a3f3d6..c7ae8ee17a 100755 --- a/Documentation/lint-manpages.sh +++ b/Documentation/lint-manpages.sh @@ -15,6 +15,8 @@ EOF } check_missing_docs () { + local ret=0 + for v in $BUILT_INS do case "$v" in @@ -34,6 +36,7 @@ check_missing_docs () { if ! test -f "Documentation/$v.txt" then echo "no doc: $v" + ret=1 fi if ! sed -e '1,/^### command list/d' -e '/^#/d' command-list.txt | @@ -43,20 +46,26 @@ check_missing_docs () { git) ;; *) - echo "no link: $v";; + echo "no link: $v" + ret=1 + ;; esac fi done + + return $ret } check_extraneous_docs () { local commands="$(printf "%s\n" "$ALL_COMMANDS" "$BUILT_INS" "$EXCLUDED_PROGRAMS")" + local ret=0 while read how cmd do if ! [[ $commands = *"$cmd"* ]] then echo "removed but $how: $cmd" + ret=1 fi done < <( sed -e '1,/^### command list/d' \ @@ -70,13 +79,29 @@ check_extraneous_docs () { sed -e 's|^|documented |' \ -e 's/\.txt//' ) + + return $ret } 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=$? + +echo "$findings" | sort + +exit $ret From patchwork Wed Jun 5 05:16:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13686154 Received: from wfhigh2-smtp.messagingengine.com (wfhigh2-smtp.messagingengine.com [64.147.123.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 E870A38FB9 for ; Wed, 5 Jun 2024 05:17:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.153 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717564622; cv=none; b=goZWsA3c6vvdjebHgR+jnQ0CsKt7VsGAzbK8Bly1tc3Hb5OPj/ALt3//EppwShxq8piI+OwtgWwUH+jpDVVQBWjYZi2YcvJ2s+R+lEgah30s1ggs9//1Hkncs8eXL5IbEsGYf/g/00ifw51drJOseq3i5igOvXyhy8TjvsI+0hE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717564622; c=relaxed/simple; bh=BcQ7n7Pzdtjy+QYm0zHhDUEDxUgmMBXGevCfs7EQ7Qk=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nVGZSeGh0A0qORnljGL+UDOuUU/NOrE5jbEWfK9HslZwgjx8iTbBm3p1aHM9m54mkh6B7bMcAEs0/Hi5pzbTzvV3BJf9d/1JAVqopbzJtU6Nw8GquRir8qoCnwOFwku5+8Fcf7Ro0R3AgXc3T81RXKrSveN1f7KYJSZ1DBzzuN8= 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=b746AjML; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Y9dUS12l; arc=none smtp.client-ip=64.147.123.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="b746AjML"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Y9dUS12l" Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.west.internal (Postfix) with ESMTP id 116DB1800144 for ; Wed, 5 Jun 2024 01:17:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 05 Jun 2024 01:17:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=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=1717564619; x=1717651019; bh=qThwoCcfSB BESCRhBYwfYjpmcra+ZGjIYFsspLpQWhA=; b=b746AjMLAJzjdvYEkaH/S9hqrN k/nt47XlqDk5qJ0vfqORxYV5BQrR1Bhoh1l5G6rsIlMStL7kbjl5+SS21PX0lnfe WoJRgrFn0jOqK9i3u15QvSTwcypDZU1mGbuBsqax9i+iNvB9/VLY+7U0WNtzp4qd vs4jxi/jHFECkqf+MltM2gxsCdigSy6FQ/LLSBNs8TtDUqfNolS2d02DcIpiv2Yk rCVtye6aeQ2TVdAZ0fI4MaxgI3v53nuC5USH/M+m1Hs8sC1Ro7Na5qdzcVlG70G5 dweRWnu2TduF+ra4mdkA0Uh4vE3SFX6CI3YfQI2LCUv0X3Mu9TZ0tf0paIqQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=1717564619; x=1717651019; bh=qThwoCcfSBBESCRhBYwfYjpmcra+ ZGjIYFsspLpQWhA=; b=Y9dUS12lCRI2Ttw20GU8477XRUcBwEy95DqAtbQzy6MB fn3hircpt+QODCxohQ4dH1gCOUVuP3W0Mz5J2xFhHR9CCN/y5kfROEqv4igE7XZP Oq+52TFipnM0qzUKj730C/TcW8Tj9GkYq3pU6Vnhc/WWRqdz0MWrNHO1OdhtLYhe 4ISMNOTJsWPZxw0vdmtkGalgOubh1ThS/saeU3MOSyQdRhqlDrOt0dcVfbujubxZ 8BCEWUFPIpZs4hu3EbXkOKgTQTasU9WD8QKR+6EZ3NEDZUYurdQ+/D3403FooYUz xIA+FW+o4epcxQU8m6p/UDCYdurj9IQWPLBUmieEog== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdelhedgleefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtvdenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehp khhsrdhimheqnecuggftrfgrthhtvghrnhepheeghfdtfeeuffehkefgffduleffjedthf dvjeektdfhhedvlefgtefgvdettdfhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 5 Jun 2024 01:16:59 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id f32aa4c3 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Wed, 5 Jun 2024 05:16:30 +0000 (UTC) Date: Wed, 5 Jun 2024 07:16:56 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Subject: [PATCH 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 Wed Jun 5 05:17:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13686155 Received: from wfhigh2-smtp.messagingengine.com (wfhigh2-smtp.messagingengine.com [64.147.123.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 47E4F10E5 for ; Wed, 5 Jun 2024 05:17:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.153 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717564627; cv=none; b=THK5G2lC/NLRo5ysdQEXriXjfh4yhXD0xH1w8Om99EAH1yaF3JX32vmYT0mCR4qaofPSHR9duKpLDuWAy7jxF/Bfte+VuomxNS/pMzbf4MwzuHrX2OhzAJnAT4Nb6qVehwqbWesXOs8SFQ0T/jxi/c3go9SEgMcUsEV2SdKrH5c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717564627; c=relaxed/simple; bh=8MiUU1COJE7M2Fvw/aMpxPChx+aRB/+11iWxHrfmT08=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DgBK2IwjdRmGjh2sgbiQabut+cl9JM3MAyTi4WJKUSzf5FbsTv+HmkzJJGYbAkibDDM+/zC1fzLDw34m/zaouBEONmcQcImWTvRrTOMiRnwJLQ23SfYmZPRsfk2pjBwyausmLRed11bMe5OFdo+MzfsW249nrLMnOoz3kHEJLiA= 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=DrTXfx3q; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=LtoxyJMd; arc=none smtp.client-ip=64.147.123.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="DrTXfx3q"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="LtoxyJMd" Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.west.internal (Postfix) with ESMTP id 74C811800092 for ; Wed, 5 Jun 2024 01:17:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 05 Jun 2024 01:17:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=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=1717564624; x=1717651024; bh=vyf1K9R1M/ tf/CxWEQ/FtENYi7h/77Kw6HGRez1rs7o=; b=DrTXfx3qvK0VsjkTchnyayt5Va bQ5A/hq/OegI4ovVDs8+RuOZO45p5hneVjt1IVXKPCzLQ97ND20lBS0ddt/TgU+L aUtqT0Fxvl/NtEMP+t5s19Ur3VtCvqCjl9hKO2qgdJs5pJ7HYMGetRSn7/IKPRya GBwR3VNCE+y64zla1Dg0nj1bkT2/ZTVgSalz2JcC15yCGj3E/BXnXqEtj9NWwKEG fGc1plCO2Z64QKIXqOHg+dOssPG+Oxm12n95NWoamVC7KTu6vpcgApLV9MIqNbI1 rKfNKdiLh37pi6xLhhL7fic5QgzXRJ1+5S+KabVX1ajrGkBHKpPYGmXSozVw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=1717564624; x=1717651024; bh=vyf1K9R1M/tf/CxWEQ/FtENYi7h/ 77Kw6HGRez1rs7o=; b=LtoxyJMdI+tT5WkZbxHbYr4cync2xDWojWO7cwHIEOX7 mVeEGo847fp+pfowZhql3/er//NP7nWi0+6rPh1CBJJrbtoUEFXU036TDB/C/can u8Q1CnxLzsEKuYj5o8gMHaJOZYL19P00xR9wqmQWb5n1i+PZ0HO+KzTeBPsrBxTh 03WqX1jelgV3LqcC5D1UFIXWM2MZ+7e7y4+iJYXI6EgKbC/ik3RQa5iYERcvKjXL M4Xp9UDAWc2wL8ElXqWdoFWM+GAW8yWg5s9RCy2ljoUGvsBqYuIOFeyoSFBVrD4J K+LIinG/+AlIWMZeSci/7dJ1hdU3TXVcqo1wd6V8YA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdelhedgleefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtvdenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehp khhsrdhimheqnecuggftrfgrthhtvghrnhepfffftddvhedutddviedthefhvdfgkefgje eukeelueeuhfduleffveevveffvefhnecuffhomhgrihhnpehphihthhhonhdrohhrghdp ghhithhhuhgsrdgtohhmpdhrvggrughmvgdrmhgunecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 5 Jun 2024 01:17:03 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id d38578b6 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Wed, 5 Jun 2024 05:16:35 +0000 (UTC) Date: Wed, 5 Jun 2024 07:17:01 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Subject: [PATCH 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" }