Repository navigation
manual: add Git License Metrics chapter to premium manual #9114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1616,3 +1616,57 @@ If you have `cppcheck-premium-loc` files in your project folders, those should b | |
| If such files are generated during analysis, then review your scripts to check why those files are generated. | ||
|
|
||
| ::: | ||
|
|
||
| ::: {.content-visible when-profile="premium"} | ||
|
|
||
| # Git License Metrics | ||
|
|
||
| ## Installing the tool | ||
|
|
||
| The tool is installed together with Cppcheck Premium. The installation folder contains a file | ||
| `git-license-metrics` that you can execute. | ||
|
|
||
| ## Clone your repositories | ||
|
|
||
| If you don't have your source code locally, you need to clone your repositories. | ||
|
|
||
| Full clone: | ||
|
|
||
| git clone URL | ||
|
|
||
| If a "full clone" is too large you can clone like this. The file data is not cloned then, which | ||
| means that the "lines of code" can't be calculated: | ||
|
|
||
| git clone --bare --filter=blob:none URL | ||
|
|
||
| ## Usage on Windows | ||
|
|
||
| Start the tool: | ||
|
|
||
|  | ||
|
|
||
| Click on "Select repository" and select the folder that contains your project code. The folder | ||
| you choose should contain the `.git` folder. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AI review The previous section suggests |
||
|
|
||
|  | ||
|
|
||
| When you click on the "Select Folder" button the report will be shown. Here is an example | ||
| report for the simplecpp repo (open source preprocessor project): | ||
|
|
||
|  | ||
|
|
||
| ## Usage on Linux | ||
|
|
||
| On Linux, `git-license-metrics` is a command line tool. Point it to the root of the repository, | ||
| copy the `[summary]` portion of the output, and send it to cppcheck sales: | ||
|
|
||
| $ ./git-license-metrics ../cppcheck | ||
| Path: ../cppcheck | ||
| [summary] | ||
| unique authors (last year): 65 | ||
| ids: | ||
| * 9761353d7534333 | ||
| * 766f7b48652cc16 | ||
| >ae601cbc6b23b02 | ||
|
|
||
| ::: | ||
There was a problem hiding this comment.
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.shdoesn't pass--embed-resources, somanual-premium.htmllinks toimages/git-license-metrics-*.png. But.github/workflows/buildman.ymlcopies onlyman/*.pdf man/*.html man/manual.csstooutput/, so the uploaded HTML shows three broken images. The PDF is fine.Fix: either copy
man/imagesin the workflow, or add--embed-resourcestobuild-html.sh.