• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

xapi-project / xen-api / 13673938296
78%
master: 80%

Build:
Build:
LAST BUILD BRANCH: dev/pau/majmin
DEFAULT BRANCH: master
Ran 05 Mar 2025 10:33AM UTC
Jobs 1
Files 33
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Mar 2025 10:32AM UTC coverage: 77.729%. Remained the same
13673938296

push

github

web-flow
Run static analysis on OCaml C stubs in the CI (#6338)

Similar to the static analyzer introduced in xha, but for OCaml C stubs.

This uses my https://ocaml.org/p/dune-compiledb/latest to product a
`compile_commands.json` for the C stubs out of the `dune` rules (which
can also be useful if you want to use `clangd` and get some editor
integration about compiler warnings). This requires installing enough of
the build dependencies to be able to run `dune` successfully (perhaps in
the future that restriction can be removed). Caching is used though, and
we only need to install the build deps when `dune` files change,
otherwise we can reuse a cached `compile_commands.json`.

Static analyzers, like CodeChecker support reading
`compile_commands.json` and invoking static analyzers with the
appropriate flags to preprocess, and analyze the C source code. We use
`clang`, `clang-tidy` and `cppcheck` as the default analyzers, although
more analyzers could be added in the future (CodeChecker supports
converting `gcc -fanalyzer` output for example. GCC also supports
emiting SARIF format directly, but github cannot parse it, because it
doesn't implement the full SARIF spec).

At the end we convert the results back to the standard SARIF format that
Github also supports for its code scanning results, which will make it
automatically add comments on PRs that introduce *new* bugs, without
necessarily gating on them.

I fixed some of the most obvious warnings, and suppressed some minor
ones that we cannot fix (where the warning is caused by a Xen or OCaml
header). More warnings can be skipped by adding to `.codechecker.json`
if needed.

So far it seems to have found a file descriptor leak in `unixpwd.c` on
an error path, but I haven't gone through all the reports in detail yet.

3354 of 4315 relevant lines covered (77.73%)

0.78 hits per line

Jobs
ID Job ID Ran Files Coverage
1 python3.11 - 13673938296.1 05 Mar 2025 10:33AM UTC 33
77.73
GitHub Action Run
Source Files on build 13673938296
  • Tree
  • List 33
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #13673938296
  • f5cd21d0 on github
  • Prev Build on gh-readonly-queue/master/pr-6329-da73f08f8ef873f1d44de6a6c436e66bbcb0edc4 (#13673635412)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc