Skip to content

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

Open
danmar wants to merge 1 commit into
cppcheck-opensource:mainfrom
cppchecksolutions:manual-git-license-metrics
Open

danmar wants to merge 1 commit 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)".

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