mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-05-05 23:58:46 +02:00
contrib: add a tartan static analysis script and description
This commit is contained in:
parent
f6e63cfc40
commit
bf3d20378f
2 changed files with 23 additions and 0 deletions
12
README.md
12
README.md
|
|
@ -51,3 +51,15 @@ logs. There are two ways of doing so:
|
|||
|
||||
3. `sudo systemctl restart upower.service`
|
||||
4. Grab logs using `journalctl -u upower.service` or similar
|
||||
|
||||
## Using tartan
|
||||
|
||||
[Tartan](https://gitlab.freedesktop.org/tartan/tartan/-/wikis/home) is a LLVM static
|
||||
analysis plugin built to analyze GLib code. It can be installed and then run using:
|
||||
|
||||
```shell
|
||||
mkdir build
|
||||
cd build
|
||||
meson setup ..
|
||||
SCANBUILD=../contrib/tartan.sh ninja scan-build
|
||||
```
|
||||
|
|
|
|||
11
contrib/tartan.sh
Executable file
11
contrib/tartan.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
/usr/bin/scan-build-20 \
|
||||
-load-plugin /usr/lib64/tartan/20.1/libtartan.so \
|
||||
-disable-checker core.CallAndMessage \
|
||||
-disable-checker core.NullDereference \
|
||||
-disable-checker deadcode.DeadStores \
|
||||
-disable-checker unix.Malloc \
|
||||
-enable-checker tartan.GErrorChecker \
|
||||
--exclude meson-private \
|
||||
--status-bugs -v "$@"
|
||||
Loading…
Add table
Reference in a new issue