Skip to content

manual: add Git License Metrics chapter to premium manual - #9114

Merged
danmar merged 3 commits into
cppcheck-opensource:mainfrom
cppchecksolutions:manual-git-license-metrics
Dec 4, 2026
Merged

danmar merged 3 commits into
cppcheck-opensource:mainfrom
cppchecksolutions:manual-git-license-metrics

Conversation

@danmar

@danmar danmar commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

Add a premium-only chapter describing the git-license-metrics tool, with screenshots of the Windows GUI.

In the PDF, keep figures where they are placed in the text, and widen the number columns in the table of contents so that numbers such as "20" and "A.100" do not run into the titles.

Add a premium-only chapter describing the git-license-metrics tool, with
screenshots of the Windows GUI.

In the PDF, keep figures where they are placed in the text, and widen the
number columns in the table of contents so that numbers such as "20" and
"A.100" do not run into the titles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ludviggunne

Copy link
Copy Markdown
Collaborator

LGTM, though I wonder if it's necessary to have screenshots? Just a few sentences with instructions would take up less space without being less clear.

@dmcppcheck dmcppcheck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review

This PR only changes documentation; no code changes. I found two new problems:

  1. The screenshots will be missing from the premium HTML manual that CI uploads. These are the first images that manual.md uses. build-html.sh doesn't embed resources, so the HTML points to images/*.png. But .github/workflows/buildman.yml copies only man/*.pdf man/*.html man/manual.css to output/, so the uploaded manual-premium.html shows three broken images. The PDF is not affected because LaTeX embeds the images. The fix is to either copy man/images in the workflow or add --embed-resources to build-html.sh.
  2. The instructions contradict each other. The new chapter suggests git clone --bare --filter=blob:none URL as an alternative. A few lines later it says that the selected folder "should contain the .git folder", but a bare clone has no .git folder; the repository data is at the top level of the folder. A user who followed the bare-clone advice won't find the folder they're told to look for.

The LaTeX changes look right: the documents use documentclass: report, where \l@chapter contains \setlength\@tempdima{1.5em}, so the \patchcmd matches.

Comments

# Comment By Where Status
1 Asks whether screenshots are needed instead of a few sentences @ludviggunne general ⚠️ Open
2 Images are missing from the premium HTML manual that CI uploads AI review man/manual.md:1646 🆕 New
3 The .git folder advice contradicts the bare clone suggested above AI review man/manual.md:1649 🆕 New

@danmar, please fix, resolve or reply to the open and new comments: #1, #2, #3.

Testing

  • I didn't build cppcheck or testrunner, because the PR only touches man/ (Markdown, LaTeX style and PNG images).
  • I couldn't build the manuals: there is no pandoc, xelatex or TeX Live in the container and no network to install them. So the PDF layout (figures kept in place, wider TOC number columns) is untested.
  • I checked by reading the files instead:
    • manual.md front matter sets documentclass: report, so the patched \l@chapter exists and the \patchcmd pattern matches it.
    • The three new PNG files are valid images (512x352, 924x478, 802x632).
    • grep -n "images/" man/manual.md finds only the three new references, so this is the first time the manual uses images.
    • build-html.sh runs pandoc ... -s --toc --css manual.css without --embed-resources, so the HTML links to the files in images/.
    • .github/workflows/buildman.yml:39 runs cp man/*.pdf man/*.html man/manual.css output/, which leaves out man/images/. The uploaded manual-premium.html therefore has broken images.

Automated review of aee1e3a by Claude. The pull request was built and tested locally.

Comment thread man/manual.md

Start the tool:

![Git License Metrics start window](images/git-license-metrics-start.png)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review

These are the first images in manual.md. build-html.sh doesn't pass --embed-resources, so manual-premium.html links to images/git-license-metrics-*.png. But .github/workflows/buildman.yml copies only man/*.pdf man/*.html man/manual.css to output/, so the uploaded HTML shows three broken images. The PDF is fine.

Fix: either copy man/images in the workflow, or add --embed-resources to build-html.sh.

Comment thread man/manual.md
![Git License Metrics start window](images/git-license-metrics-start.png)

Click on "Select repository" and select the folder that contains your project code. The folder
you choose should contain the `.git` folder.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review

The previous section suggests git clone --bare --filter=blob:none URL. A bare clone has no .git folder: the repository data (HEAD, objects/, ...) is at the top level of the folder. So "The folder you choose should contain the .git folder" is wrong for users who followed that advice. Mention the bare-clone case here, for example: "(for a bare clone, select the cloned folder itself)".

danmar and others added 2 commits December 4, 2026 14:40
The HTML manual links to the images in man/images, so copy that folder
to the uploaded output. Also explain which folder to select for a bare
clone, since it has no .git folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A bare clone has no .git folder. Use --no-checkout instead of --bare, so
the file data is still not downloaded but the clone has a .git folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@dmcppcheck dmcppcheck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review

The PR changes only documentation, and I found no new problems. The two problems from the earlier AI review are fixed. The workflow now runs cp -r man/images output/, and the chapter recommends git clone --no-checkout --filter=blob:none, which creates a .git folder, so the advice to select the folder that contains .git is now right. One risk is untested: CI builds the PDFs in pandoc/latex:3.6.3, which has only a minimal TeX Live. The workflow already installs titlesec and newverbs with tlmgr because they are missing from that image. I could not check whether the newly used float and etoolbox packages are in the image. The PDF CI job will show whether they are.

Comments

# Comment By Where Status
1 Asks whether screenshots are needed instead of a few sentences of instructions @ludviggunne general ⚠️ Open
2 Images missing from the premium HTML manual that CI uploads AI review man/manual.md:1646 ✅ Fixed
3 Advice to select the folder with .git contradicts the suggested bare clone AI review man/manual.md:1649 ✅ Fixed

@danmar, please fix, resolve or reply to the open and new comments: #1.

Testing

  • I did not build cppcheck or testrunner, because the PR touches only man/ and .github/workflows/buildman.yml.
  • I could not build the manuals. The container has no pandoc and no xelatex, and there is no network to install them. So the PDF layout is untested: figures kept in place, wider TOC number columns, and whether float and etoolbox are available in the CI image.
  • I checked by reading the files instead:
    • buildman.yml now copies man/images next to the HTML files, so the images/... links in manual-premium.html resolve.
    • manual.md and reference-cfg-format.md, the two documents that build-pdf.sh builds with -H manual-style.tex, both use documentclass: report. So the \l@chapter patch and the new \l@section/\l@subsection definitions apply to the class they were written for.
    • The new TOC indents are consistent: the section indent of 2.2em equals the new chapter number width, and the subsection indent of 6.1em is 2.2em + 3.9em.
    • The three new PNG files are valid images.
    • The clone instructions now use --no-checkout, which keeps a .git folder and matches the "select the folder that contains .git" text.

Automated review of f4115ff by Claude. The pull request was built and tested locally.

@danmar
danmar merged commit 02148a4 into cppcheck-opensource:main Dec 4, 2026
74 checks passed
@danmar
danmar deleted the manual-git-license-metrics branch December 4, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants