Skip to content

Commit e03f3f5

Browse files
committed
doc lint: check that synopsis manpages have synopsis inlines
When switching manpages to the synopsis style, the description lists of options need to be switched to inline synopsis for proper formatting. This is done by enclosing the option name in double backticks, e.g. `--option`. Signed-off-by: Jean-Noël Avila <[email protected]>
1 parent 713c86d commit e03f3f5

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

Documentation/git-refs.adoc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,41 +20,41 @@ This command provides low-level access to refs.
2020
COMMANDS
2121
--------
2222

23-
migrate::
23+
`migrate`::
2424
Migrate ref store between different formats.
2525

26-
verify::
26+
`verify`::
2727
Verify reference database consistency.
2828

2929
OPTIONS
3030
-------
3131

32-
The following options are specific to 'git refs migrate':
32+
The following options are specific to `git refs migrate`:
3333

34-
--ref-format=<format>::
34+
`--ref-format=<format>`::
3535
The ref format to migrate the ref store to. Can be one of:
3636
+
3737
include::ref-storage-format.adoc[]
3838

39-
--dry-run::
39+
`--dry-run`::
4040
Perform the migration, but do not modify the repository. The migrated
4141
refs will be written into a separate directory that can be inspected
4242
separately. The name of the directory will be reported on stdout. This
4343
can be used to double check that the migration works as expected before
4444
performing the actual migration.
4545

46-
--reflog::
47-
--no-reflog::
46+
`--reflog`::
47+
`--no-reflog`::
4848
Choose between migrating the reflog data to the new backend,
4949
and discarding them. The default is "--reflog", to migrate.
5050

51-
The following options are specific to 'git refs verify':
51+
The following options are specific to `git refs verify`:
5252

53-
--strict::
53+
`--strict`::
5454
Enable stricter error checking. This will cause warnings to be
5555
reported as errors. See linkgit:git-fsck[1].
5656

57-
--verbose::
57+
`--verbose`::
5858
When verifying the reference database consistency, be chatty.
5959

6060
KNOWN LIMITATIONS

Documentation/lint-documentation-style.perl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ sub report {
2121
if ($line =~ /^`?--\[no-\][a-z0-9-]+.*(::|;;)$/) {
2222
report($line, "definition list item with a `--[no-]` parameter");
2323
}
24+
if ($line =~ /^\[synopsis\]$/) {
25+
$synopsis_style = 1;
26+
}
27+
if (($line =~ /^-[-a-z].*(::|;;)$/) && ($synopsis_style)) {
28+
report($line, "synopsis style and definition list item not backquoted");
29+
}
2430
}
2531

2632

0 commit comments

Comments
 (0)