[tor-commits] [tor] 01/07: Fix `check-docs` to avoid false-positives on missing anchors.

gitolite role git at cupani.torproject.org
Thu Jul 21 19:19:38 UTC 2022


This is an automated email from the git hooks/post-receive script.

nickm pushed a commit to branch main
in repository tor.

commit 6c1aad13e22d558b80463682f005d04bfdb2d162
Author: Nick Mathewson <nickm at torproject.org>
AuthorDate: Thu Jun 16 11:50:59 2022 -0400

    Fix `check-docs` to avoid false-positives on missing anchors.
    
    Also add an anchor for the second ClientTranportPlugin instance.
    
    See #40339.
    
    This doesn't need a changes file because it isn't user-facing.
---
 doc/man/tor.1.txt                   | 2 +-
 scripts/maint/checkOptionDocs.pl.in | 9 ++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/doc/man/tor.1.txt b/doc/man/tor.1.txt
index 6a4afc0bbd..065324c104 100644
--- a/doc/man/tor.1.txt
+++ b/doc/man/tor.1.txt
@@ -335,7 +335,7 @@ forward slash (/) in the configuration file and on the command line.
     to mess with it. (Default: -1)
 
 [[ClientTransportPlugin]] **ClientTransportPlugin** __transport__ socks4|socks5 __IP__:__PORT__::
-**ClientTransportPlugin** __transport__ exec __path-to-binary__ [options]::
+[[ClientTransportPlugin-2]] **ClientTransportPlugin** __transport__ exec __path-to-binary__ [options]::
     In its first form, when set along with a corresponding Bridge line, the Tor
     client forwards its traffic to a SOCKS-speaking proxy on "IP:PORT".
     (IPv4 addresses should written as-is; IPv6 addresses should be wrapped in
diff --git a/scripts/maint/checkOptionDocs.pl.in b/scripts/maint/checkOptionDocs.pl.in
index 2d4a7884f5..d2c2a838d6 100644
--- a/scripts/maint/checkOptionDocs.pl.in
+++ b/scripts/maint/checkOptionDocs.pl.in
@@ -41,9 +41,16 @@ loadTorrc("@abs_top_srcdir@/src/config/torrc.sample.in", \%torrcSampleOptions);
 my $considerNextLine = 0;
 open(F, "@abs_top_srcdir@/doc/man/tor.1.txt") or die;
 while (<F>) {
-    if (m!^(?:\[\[([A-za-z0-9_]+)\]\] *)?\*\*([A-Za-z0-9_]+)\*\*!) {
+    if (m!^(?:\[\[([A-za-z0-9_]+)\]\] *)?\*\*([A-Za-z0-9_]+)\*\*! && $considerNextLine) {
         $manPageOptions{$2} = 1;
         print "Missing an anchor: $2\n" unless (defined $1 or $2 eq 'tor');
+        $considerNextLine = 1;
+    } elsif (m!^\s*$! or
+             m!^\s*\+\s*$! or
+             m!^\s*//!) {
+        $considerNextLine = 1;
+    } else {
+        $considerNextLine = 0;
     }
 }
 close F;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tor-commits mailing list