diff options
author | Nick Mathewson <nickm@torproject.org> | 2022-06-16 11:50:59 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2022-06-16 11:50:59 -0400 |
commit | 6c1aad13e22d558b80463682f005d04bfdb2d162 (patch) | |
tree | 2a73f1d1902cb9ab18039bbbbaaaa5ce6710cfba /scripts | |
parent | 1d6470a2a83ca6bab8c52bcff5d0969b1866a4df (diff) | |
download | tor-6c1aad13e22d558b80463682f005d04bfdb2d162.tar.gz tor-6c1aad13e22d558b80463682f005d04bfdb2d162.zip |
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.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/maint/checkOptionDocs.pl.in | 9 |
1 files changed, 8 insertions, 1 deletions
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; |