diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-08-25 14:22:01 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-08-25 14:22:02 -0700 |
| commit | 0d8f4ccfe3b13bb5eb95f030dc5fe76efb255397 (patch) | |
| tree | d7c7205b2ae9788e006996be6f8074978f215507 /Documentation/lint-gitlink.perl | |
| parent | Merge branch 'tc/diff-tree-max-depth' (diff) | |
| parent | doc lint: check that synopsis manpages have synopsis inlines (diff) | |
| download | git-0d8f4ccfe3b13bb5eb95f030dc5fe76efb255397.tar.gz git-0d8f4ccfe3b13bb5eb95f030dc5fe76efb255397.zip | |
Merge branch 'ja/doc-lint-sections-and-synopsis'
Doc lint updates to encourage the newer and easier-to-use
`synopsis` format, with fixes to a handful of existing uses.
* ja/doc-lint-sections-and-synopsis:
doc lint: check that synopsis manpages have synopsis inlines
doc:git-for-each-ref: fix styling and typos
doc: check for absence of the form --[no-]parameter
doc: check for absence of multiple terms in each entry of desc list
doc: check well-formedness of delimited sections
doc: test linkgit macros for well-formedness
Diffstat (limited to 'Documentation/lint-gitlink.perl')
| -rwxr-xr-x | Documentation/lint-gitlink.perl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/lint-gitlink.perl b/Documentation/lint-gitlink.perl index aea564dad7..f183a18df2 100755 --- a/Documentation/lint-gitlink.perl +++ b/Documentation/lint-gitlink.perl @@ -41,6 +41,13 @@ die "BUG: No list of valid linkgit:* files given" unless @ARGV; @ARGV = $to_check; while (<>) { my $line = $_; + while ($line =~ m/(.{,8})((git[-a-z]+|scalar)\[(\d)*\])/g) { + my $pos = pos $line; + my ($macro, $target, $page, $section) = ($1, $2, $3, $4); + if ( $macro ne "linkgit:" && $macro !~ "ifn?def::" && $macro ne "endif::" ) { + report($pos, $line, $target, "linkgit: macro expected"); + } + } while ($line =~ m/linkgit:((.*?)\[(\d)\])/g) { my $pos = pos $line; my ($target, $page, $section) = ($1, $2, $3); |
