I am experimenting with a webserver that will execute the test-my-pr script on PRs. I want more or less that it will provide daca@home feedback directly when somebody works on a PR.
It is only executed on open non-draft PRs that have a successful CI.
It will execute on 1000 packages if the PR modifies tokenizer or valueflow. Otherwise it will execute on 100 packages. When I started it , it would count packages even if they did not have C/C++ code that is fixed now..
AI-generated verdicts will be provided for a random subset of the warnings (up to 20 or so). Those should be taken with a grain of salt for now.
Please provide feedback. Do you think I should tweak the reports or output somehow?
Last edit: Daniel Marjamäki 2026-10-06
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's still being processed. If we will have trouble to keep up with open PRs I think we can launch more runner VMs.
It might be low with 100/1000 .. I will see if it makes sense to increase these values later. At least if a runner is idle it could fill up more packages..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok I just noticed some of the dates in those PR files I got the packages
from.
I will remove all the PR files from before Oct 6. Given that is about half
of them I will probably add a few more and rerun my code. Hopefully I will
see better coverage numbers on the low end.
When I try to go to the link it says the website can't be reached. I was
thinking of pulling the package list from there but the site seems down. I
was hoping to also get the list of packages that crash or hang up cop
check. That way I could have my script avoid them.
Hopefully the table below looks ok. I will attach 2 CSV files. The
first one is called StatFile.csv and that is this table below. Which shows
some stats about code coverage of a few of the CppCheck source code files
and all the numbers are %. I checked 4015 Debian packages. I can say the
Overall Coverage numbers are under estimates. When I looked at the gcov
data I found that it was saying there were 220048 source lines, but going
through the output it was counting files outside of cppcheck
like /usr/include/c++/14/bits/chrono.h, /usr/include/c++/14/bits/stl_tree.h
and other system files. So I will write a parser for a later date to fix
that. The 2nd file is Main.coverage.csv it shows a few more files and all
the packages that were checked. One of the reasons I started looking into
this is gcc has made some changes to code coverage tooling(gcov) in version
14 and 15. I often prototype a lot of these types of things in bash just
to quickly find the interesting parts. Long term I will probably rewrite it
all in python. The statical mode tends to be very interesting for code
coverage. In the past I have used that for estimating the number of paths
in a code base. One of the changes to gcc 15 is to give you that
information. So I was using this as a way to test how good my old
estimates were. I just thought this information might be useful for the PR
script to maybe pick 10 packages off the list with high code coverage in
conjunction with a large amount of random packages. I am just hoping that
the packages with larger coverage would help find issues at the PR level
before code is let in and then gets caught in the cppcheck1.osuosl.org http://cppcheck1.osuosl.org:8000/ (Which still shows that it can't be
reached by at least me).
Once I fix the overall coverage issue I might make another csv file showing
the frequency of coverage %. If there is any other information you would
like to know please feel free to let me know.
Ok I just noticed some of the dates in those PR files I got the packages
from.
I will remove all the PR files from before Oct 6. Given that is about half
of them I will probably add a few more and rerun my code. Hopefully I will
see better coverage numbers on the low end.
When I try to go to the link it says the website can't be reached. I was
thinking of pulling the package list from there but the site seems down. I
was hoping to also get the list of packages that crash or hang up cop
check. That way I could have my script avoid them.
On Thu, Oct 22, 2026, 4:21 AM CHR chrchr@users.sourceforge.net wrote:
One thing I recomend when it comes to AI is to keep internal metrics so that you can better help you evluete AI future solutions. That includes keeping track of the work done by AI which you can put a tag in an issue or a tag in the git commit message. You will want to be able to match that tag to a prompt, token usage and model version number. That way if you want to make changes later to your AI process you can test it aginst past solutions to see if the change adds value.
On a side note one thing I never got around to was trying to come up with better usage metrics for valueflow. While I was mainly looking for perfomance use case issues. I think there might be some value in value flow code coverage vs the debian packages. I know GCC 14 added a new feature called MCDC coverage -fcondition-coverage -fprofile-arcs -ftest-coverage It might make since to run this vs the debian packages maybe once a release because we might find a better core set of packages to run So instead of 100 and 1000 you could 70 and 850. You might find some long run time pages are just using the same paths in the value flow vs a lot of diffrent paths. I think as an excersize I can run cppcheck with the GCC MCDC vs serval debian packages and post my finding and output in a new thread if it provides anything useful.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think one thing that matters a lot is how easy is it for you to integrate into your workflow. For me given that I learned to code inside a unix terminal and never evolved to using an IDE to code with AI isnt to difficult to record my interactions with. The script command https://www.redhat.com/en/blog/linux-script-command does alot of the heavy lifting. I also write a bit of data like starting and stopping git hash as well as the ai model version and token usage to a file. That way I can restore the state and test with a different model. In my mind I think this is useful to see which kind of AI workloads that can be shifted to slower local AI models and save tokens for fast interactive sessions when I am working directly with AI. For the most part I am only tracking my use of AI. I have given some thought to how I would do it from a software project level by using a git submodule. Lets take cppcheck as an example. I would have my AI meta data repo with cppcheck as a submodule to that repo. I even think some pre commit hooks could be used to help automate some data collection in the AI meta data repo. Also this helps with comparisons because cppcheck lives outside the repo. You need to do a 3 way diff to evaluate different AI models. To me I like all the AI meta data out side of the main project repo that way it doesn't pollute the main project repo. I could probably throw something together if you are intereste, but ever since vscode has come out as a popular IDE I see fewer people interested in terminal based solutions.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I wrote a couple of bash scripts to run over the weekend to do code coverage of the released 2.22.0 version of cppcheck with debian packages (It's still running). I wasn't sure how you knows a package had C/C++ code in them, so I just pulled from the following 9 PR's below and hopped for the best.
2026-02-18_12-13-45-d234d745fefe-results.txt
2026-10-05_07-31-15-7f232989d1f9-results.txt
2026-10-09_20-01-23-da724f2e5700-results.txt
2026-09-08_13-51-12-2a0c507aec8b-results.txt
2026-10-05_14-59-08-c5bef2ae24cd-results.txt
2026-10-10_20-28-58-72fa07506cc7-results.txt
2026-10-02_13-25-25-9781751b1038-results.txt
2026-10-05_22-41-06-51b980ae69f3-results.txt
2026-10-12_10-41-10-ee06c4593b71-results.txt
That ended up being 4880 uniq packages. My scripts has currently run cppcheck with the folling arguments check=all -D__GNUC__ on 4260 the debian packages.
Here is the bottom 25 packages for coverage. Given how some of these things are named like Golang for example it might not have a lot of C/C++ code in them.
I still have all the gcov data at the file level if you are intrested.
My idea is pretty simple whenever Cppcheck makes a release (Normally cppcheck does 3 or 4 a year) I could run the coverage data. I have a feeling that structurally these numbers probably don't change too much. I see this having two advantages. One you could add the top 10 to your random list of packages just to make sure you have some with good code coverage. Two you can give developers a script to run against that static 10 locally before submitting their PR. That might reduce the load on your PR system and reduce churn on the PR's themselves.
Let me know if this is of any interest to you.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am experimenting with a webserver that will execute the test-my-pr script on PRs. I want more or less that it will provide daca@home feedback directly when somebody works on a PR.
http://ec2-16-170-140-253.eu-north-1.compute.amazonaws.com/
It is only executed on open non-draft PRs that have a successful CI.
It will execute on 1000 packages if the PR modifies tokenizer or valueflow. Otherwise it will execute on 100 packages. When I started it , it would count packages even if they did not have C/C++ code that is fixed now..
AI-generated verdicts will be provided for a random subset of the warnings (up to 20 or so). Those should be taken with a grain of salt for now.
Please provide feedback. Do you think I should tweak the reports or output somehow?
Last edit: Daniel Marjamäki 2026-10-06
Having a link to the actual PR would be nice (instead of/additional to linking to the AWS files).
How is reanalysis supposed to work? E.g. for #8918, the latest commit shown is from Oct 5, while there is a newer commit from Oct 7 already (https://github.com/cppcheck-opensource/cppcheck/pull/8918/changes/97161058bc8dbc7b18acf69ae1cf324a21507f65).
Good idea 👍
Having the user name in a column would be nice.
Also, some PRs seem to be missing. Are they still being processed?
Last edit: CHR 2026-10-07
It's still being processed. If we will have trouble to keep up with open PRs I think we can launch more runner VMs.
It might be low with 100/1000 .. I will see if it makes sense to increase these values later. At least if a runner is idle it could fill up more packages..
It looks like merged PRs are not flushed out, e.g. https://github.com/cppcheck-opensource/cppcheck/pull/8934
Ok I just noticed some of the dates in those PR files I got the packages
from.
I will remove all the PR files from before Oct 6. Given that is about half
of them I will probably add a few more and rerun my code. Hopefully I will
see better coverage numbers on the low end.
What ever happened to http://cppcheck1.osuosl.org:8000/?
When I try to go to the link it says the website can't be reached. I was
thinking of pulling the package list from there but the site seems down. I
was hoping to also get the list of packages that crash or hang up cop
check. That way I could have my script avoid them.
On Thu, Oct 22, 2026, 4:21 AM CHR chrchr@users.sourceforge.net wrote:
Hopefully the table below looks ok. I will attach 2 CSV files. The
first one is called StatFile.csv and that is this table below. Which shows
some stats about code coverage of a few of the CppCheck source code files
and all the numbers are %. I checked 4015 Debian packages. I can say the
Overall Coverage numbers are under estimates. When I looked at the gcov
data I found that it was saying there were 220048 source lines, but going
through the output it was counting files outside of cppcheck
like /usr/include/c++/14/bits/chrono.h, /usr/include/c++/14/bits/stl_tree.h
and other system files. So I will write a parser for a later date to fix
that. The 2nd file is Main.coverage.csv it shows a few more files and all
the packages that were checked. One of the reasons I started looking into
this is gcc has made some changes to code coverage tooling(gcov) in version
14 and 15. I often prototype a lot of these types of things in bash just
to quickly find the interesting parts. Long term I will probably rewrite it
all in python. The statical mode tends to be very interesting for code
coverage. In the past I have used that for estimating the number of paths
in a code base. One of the changes to gcc 15 is to give you that
information. So I was using this as a way to test how good my old
estimates were. I just thought this information might be useful for the PR
script to maybe pick 10 packages off the list with high code coverage in
conjunction with a large amount of random packages. I am just hoping that
the packages with larger coverage would help find issues at the PR level
before code is let in and then gets caught in the cppcheck1.osuosl.org
http://cppcheck1.osuosl.org:8000/ (Which still shows that it can't be
reached by at least me).
Once I fix the overall coverage issue I might make another csv file showing
the frequency of coverage %. If there is any other information you would
like to know please feel free to let me know.
FileName Mean StdDev Median Mode ModeFreq
Range Max Min
Overallcoverage 22.25 5.78 22.8 4.34 0.473 32.35 35.99 3.64
checkothercpp 9.66 2.52 9.87 0 4.334 14.84 14.84 0
tokenlistcpp 51.18 13.52 50.62 1.23 1.519 84.41 84.41 0
astutilscpp 55.77 17.96 58.39 0 2.565 88.27 88.27 0
symboldatabasecpp 40.69 14.62 38.91 0 3.587 78.51 78.51 0
tokencpp 57.21 20.65 55.78 0 3.138 94.94 94.94 0
forwardanalyzercpp 72.06 23.47 80.46 0 6.476 96.04 96.04 0
valueflowcpp 48.18 17.17 49.42 0 4.334 88.06 88.06 0
checkclasscpp 4.36 4.19 1.03 1.03 53.25 13.94 14.37 0.43
checkconditioncpp 3.54 0.75 3.7 3.7 95.666 3.7 3.7 0
programmemorycpp 52.39 16.96 56.96 0 6.351 89.75 89.75 0
vfvaluecpp 34.17 13.71 40.15 40.91 8.045 58.33 58.33 0
checkiocpp 16.98 8.69 17.33 7.04 6.027 45.29 45.29 0
templatesimplifiercpp 10.83 18.21 1.67 0.29 18.555 79.66 79.66 0
tokenizecpp 33.2 11.73 31.1 0.01 1.619 76.56 76.57 0.01
checkstlcpp 9.82 12.51 0.12 0.12 53.25 47.02 47.02 0
On Sun, Oct 25, 2026 at 3:33 PM john borland amishscientist@users.sourceforge.net wrote:
One thing I recomend when it comes to AI is to keep internal metrics so that you can better help you evluete AI future solutions. That includes keeping track of the work done by AI which you can put a tag in an issue or a tag in the git commit message. You will want to be able to match that tag to a prompt, token usage and model version number. That way if you want to make changes later to your AI process you can test it aginst past solutions to see if the change adds value.
On a side note one thing I never got around to was trying to come up with better usage metrics for valueflow. While I was mainly looking for perfomance use case issues. I think there might be some value in value flow code coverage vs the debian packages. I know GCC 14 added a new feature called MCDC coverage -fcondition-coverage -fprofile-arcs -ftest-coverage It might make since to run this vs the debian packages maybe once a release because we might find a better core set of packages to run So instead of 100 and 1000 you could 70 and 850. You might find some long run time pages are just using the same paths in the value flow vs a lot of diffrent paths. I think as an excersize I can run cppcheck with the GCC MCDC vs serval debian packages and post my finding and output in a new thread if it provides anything useful.
how do you suggest that I do that?
I think one thing that matters a lot is how easy is it for you to integrate into your workflow. For me given that I learned to code inside a unix terminal and never evolved to using an IDE to code with AI isnt to difficult to record my interactions with. The script command https://www.redhat.com/en/blog/linux-script-command does alot of the heavy lifting. I also write a bit of data like starting and stopping git hash as well as the ai model version and token usage to a file. That way I can restore the state and test with a different model. In my mind I think this is useful to see which kind of AI workloads that can be shifted to slower local AI models and save tokens for fast interactive sessions when I am working directly with AI. For the most part I am only tracking my use of AI. I have given some thought to how I would do it from a software project level by using a git submodule. Lets take cppcheck as an example. I would have my AI meta data repo with cppcheck as a submodule to that repo. I even think some pre commit hooks could be used to help automate some data collection in the AI meta data repo. Also this helps with comparisons because cppcheck lives outside the repo. You need to do a 3 way diff to evaluate different AI models. To me I like all the AI meta data out side of the main project repo that way it doesn't pollute the main project repo. I could probably throw something together if you are intereste, but ever since vscode has come out as a popular IDE I see fewer people interested in terminal based solutions.
Depending on how many tokens you want to use here are other things you can ask AI about a PR.
I wrote a couple of bash scripts to run over the weekend to do code coverage of the released 2.22.0 version of cppcheck with debian packages (It's still running). I wasn't sure how you knows a package had C/C++ code in them, so I just pulled from the following 9 PR's below and hopped for the best.
That ended up being 4880 uniq packages. My scripts has currently run cppcheck with the folling arguments check=all -D__GNUC__ on 4260 the debian packages.
Here is the Top 75 packages for coverage.
Here is the bottom 25 packages for coverage. Given how some of these things are named like Golang for example it might not have a lot of C/C++ code in them.
I know in the comments above you talked about doing more packages based on changes to tokenizer or valueflow.
Here are the top 50 for valueflow.cpp
Here are the top 50 for tokenize.cpp
I still have all the gcov data at the file level if you are intrested.
My idea is pretty simple whenever Cppcheck makes a release (Normally cppcheck does 3 or 4 a year) I could run the coverage data. I have a feeling that structurally these numbers probably don't change too much. I see this having two advantages. One you could add the top 10 to your random list of packages just to make sure you have some with good code coverage. Two you can give developers a script to run against that static 10 locally before submitting their PR. That might reduce the load on your PR system and reduce churn on the PR's themselves.
Let me know if this is of any interest to you.
Thanks