git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 0/6] Introduce more doc linting

From
Jean-Noël Avila via GitGitGadget <gitgitgadget@gmail.com>
Date
Aug 5, 2025, 19:10 UTC
Message-ID
<pull.1945.v2.git.1754421045.gitgitgadget@gmail.com>
In-Reply-To
<pull.1945.git.1754399033.gitgitgadget@gmail.com>

Reviewing the documentation part of the last patches, it turns out that the majority of my comments are related to the latest documentation guidelines which are both easy to forget and almost trivial to automatically check.

This series implements the automatic tests for basic doc rules. At the moment it conflicts with "[GSoC][PATCH v6 0/6] Add refs list subcommand" and possibly with "[PATCH v4 0/9] refs: fix migration of reflog entries"

Jean-Noël Avila (6):
  doc: test linkgit macros for well-formedness
  doc: check well-formedness of delimited sections
  doc: check for absence of multiple terms in each entry of desc list
  doc: check for absence of the form --[no-]parameter
  doc:git-for-each-ref: fix styling and typos
  doc lint: check that synopsis manpages have synopsis inlines
 Documentation/Makefile                        |  21 +-
 Documentation/RelNotes/1.6.2.4.adoc           |   1 +
 Documentation/blame-options.adoc              |   3 +-
 Documentation/diff-format.adoc                |   1 +
 Documentation/diff-options.adoc               |   3 +-
 Documentation/fetch-options.adoc              |  15 +-
 Documentation/git-am.adoc                     |   3 +-
 Documentation/git-backfill.adoc               |   3 +-
 Documentation/git-cat-file.adoc               |   6 +-
 Documentation/git-check-attr.adoc             |   3 +-
 Documentation/git-check-ignore.adoc           |   9 +-
 Documentation/git-check-ref-format.adoc       |   3 +-
 Documentation/git-checkout.adoc               |   2 +-
 Documentation/git-clone.adoc                  |  12 +-
 Documentation/git-commit-graph.adoc           |   3 +-
 Documentation/git-commit.adoc                 |   4 +-
 Documentation/git-config.adoc                 |   3 +-
 Documentation/git-difftool.adoc               |   9 +-
 Documentation/git-fast-import.adoc            |   5 +-
 Documentation/git-fmt-merge-msg.adoc          |   3 +-
 Documentation/git-for-each-ref.adoc           | 264 +++++++++---------
 Documentation/git-format-patch.adoc           |  12 +-
 Documentation/git-fsck.adoc                   |   9 +-
 Documentation/git-gc.adoc                     |   6 +-
 Documentation/git-http-fetch.adoc             |   4 +-
 Documentation/git-index-pack.adoc             |   3 +-
 Documentation/git-log.adoc                    |   6 +-
 Documentation/git-merge-tree.adoc             |   3 +-
 Documentation/git-multi-pack-index.adoc       |   3 +-
 Documentation/git-p4.adoc                     |   1 +
 Documentation/git-pack-objects.adoc           |   3 +-
 Documentation/git-pull.adoc                   |   3 +-
 Documentation/git-push.adoc                   |  18 +-
 Documentation/git-range-diff.adoc             |   3 +-
 Documentation/git-read-tree.adoc              |   3 +-
 Documentation/git-rebase.adoc                 |   2 +-
 Documentation/git-refs.adoc                   |  20 +-
 Documentation/git-reset.adoc                  |   3 +-
 Documentation/git-send-email.adoc             |  30 +-
 Documentation/git-send-pack.adoc              |   3 +-
 Documentation/git-submodule.adoc              |   6 +-
 Documentation/git-svn.adoc                    |   2 +
 Documentation/git-update-index.adoc           |  12 +-
 Documentation/git-upload-pack.adoc            |   3 +-
 Documentation/git-worktree.adoc               |  12 +-
 Documentation/gitprotocol-http.adoc           |   2 +-
 Documentation/gitsubmodules.adoc              |   3 +-
 Documentation/gitweb.conf.adoc                |   2 +-
 Documentation/lint-delimited-sections.perl    |  48 ++++
 Documentation/lint-documentation-style.perl   |  33 +++
 Documentation/lint-gitlink.perl               |   7 +
 Documentation/merge-options.adoc              |   3 +-
 Documentation/mergetools/vimdiff.adoc         |   8 +
 Documentation/scalar.adoc                     |  18 +-
 Documentation/technical/api-path-walk.adoc    |   5 +-
 .../long-running-process-protocol.adoc        |   1 +
 shared.mak                                    |   2 +
 57 files changed, 446 insertions(+), 232 deletions(-)
 create mode 100755 Documentation/lint-delimited-sections.perl
 create mode 100755 Documentation/lint-documentation-style.perl
base-commit: 112648dd6bdd8e4f485cd0ae11636807959d48be
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1945%2Fjnavila%2Fdoc_linting-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1945/jnavila/doc_linting-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/1945
Range-diff vs v1:
 1:  e79bd6a67ef = 1:  e79bd6a67ef doc: test linkgit macros for well-formedness
 2:  322df2d8dde = 2:  322df2d8dde doc: check well-formedness of delimited sections
 3:  5806390052b = 3:  5806390052b doc: check for absence of multiple terms in each entry of desc list
 4:  03a8428849f = 4:  03a8428849f doc: check for absence of the form --[no-]parameter
 5:  713c86dae92 = 5:  713c86dae92 doc:git-for-each-ref: fix styling and typos
 6:  e03f3f5c55a ! 6:  d57478ea5cd doc lint: check that synopsis manpages have synopsis inlines
     @@ Commit message
      
          Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
      
     + ## Documentation/git-checkout.adoc ##
     +@@ Documentation/git-checkout.adoc: include::diff-context-options.adoc[]
     + 	separated with _NUL_ character and all other characters are taken
     + 	literally (including newlines and quotes).
     + 
     +-<branch>::
     ++`<branch>`::
     + 	Branch to checkout; if it refers to a branch (i.e., a name that,
     + 	when prepended with "refs/heads/", is a valid ref), then that
     + 	branch is checked out. Otherwise, if it refers to a valid
     +
       ## Documentation/git-refs.adoc ##
      @@ Documentation/git-refs.adoc: This command provides low-level access to refs.
       COMMANDS
     @@ Documentation/lint-documentation-style.perl: while (my $line = <>) {
      +	if ($line =~ /^\[synopsis\]$/) {
      +		$synopsis_style = 1;
      +	}
     -+	if (($line =~ /^-[-a-z].*(::|;;)$/) && ($synopsis_style)) {
     ++	if (($line =~ /^(-[-a-z].*|<[-a-z0-9]+>(\.{3})?)(::|;;)$/) && ($synopsis_style)) {
      +			report($line, "synopsis style and definition list item not backquoted");
      +	}
       }
-- 
gitgitgadget
Previous: Junio C HamanoNext: Jean-Noël Avila via GitGitGadget
Message 9 of 28 in “Introduce more doc linting”
  1. 0/6 Introduce more doc lintingJean-Noël Avila via GitGitGadget, Aug 5, 2025
  2. 1/6 doc: test linkgit macros for well-formednessJean-Noël Avila via GitGitGadget, Aug 5, 2025
  3. 2/6 doc: check well-formedness of delimited sectionsJean-Noël Avila via GitGitGadget, Aug 5, 2025
  4. 3/6 doc: check for absence of multiple terms in each entry of desc listJean-Noël Avila via GitGitGadget, Aug 5, 2025
  5. 4/6 doc: check for absence of the form --[no-]parameterJean-Noël Avila via GitGitGadget, Aug 5, 2025
  6. 5/6 doc:git-for-each-ref: fix styling and typosJean-Noël Avila via GitGitGadget, Aug 5, 2025
  7. 6/6 doc lint: check that synopsis manpages have synopsis inlinesJean-Noël Avila via GitGitGadget, Aug 5, 2025
  8. Junio C HamanoAug 5, 2025
  9. 0/6 Introduce more doc lintingJean-Noël Avila via GitGitGadget, Aug 5, 2025
  10. 1/6 doc: test linkgit macros for well-formednessJean-Noël Avila via GitGitGadget, Aug 5, 2025
  11. 2/6 doc: check well-formedness of delimited sectionsJean-Noël Avila via GitGitGadget, Aug 5, 2025
  12. 3/6 doc: check for absence of multiple terms in each entry of desc listJean-Noël Avila via GitGitGadget, Aug 5, 2025
  13. Ramsay JonesAug 5, 2025
  14. Jean-Noël AVILAAug 8, 2025
  15. Collin FunkAug 6, 2025
  16. Jean-Noël AVILAAug 8, 2025
  17. 4/6 doc: check for absence of the form --[no-]parameterJean-Noël Avila via GitGitGadget, Aug 5, 2025
  18. 5/6 doc:git-for-each-ref: fix styling and typosJean-Noël Avila via GitGitGadget, Aug 5, 2025
  19. 6/6 doc lint: check that synopsis manpages have synopsis inlinesJean-Noël Avila via GitGitGadget, Aug 5, 2025
  20. 0/6 Introduce more doc lintingJean-Noël Avila via GitGitGadget, Aug 11, 2025
  21. 1/6 doc: test linkgit macros for well-formednessJean-Noël Avila via GitGitGadget, Aug 11, 2025
  22. 2/6 doc: check well-formedness of delimited sectionsJean-Noël Avila via GitGitGadget, Aug 11, 2025
  23. 3/6 doc: check for absence of multiple terms in each entry of desc listJean-Noël Avila via GitGitGadget, Aug 11, 2025
  24. 4/6 doc: check for absence of the form --[no-]parameterJean-Noël Avila via GitGitGadget, Aug 11, 2025
  25. 5/6 doc:git-for-each-ref: fix styling and typosJean-Noël Avila via GitGitGadget, Aug 11, 2025
  26. 6/6 doc lint: check that synopsis manpages have synopsis inlinesJean-Noël Avila via GitGitGadget, Aug 11, 2025
  27. Junio C HamanoAug 14, 2025
  28. Jean-Noël AVILAAug 14, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.