Registry / testing / scan-build

scan-build

JSON →
library3.0.0pypypi✓ verified 80d ago

A static code analyzer tool for Clang that uses compilation databases (compile_commands.json). Version 3.0.0 is the latest, requiring Python >=3.10 and dropping support for 3.6-3.9. The package is maintained with modern tooling (hatchling, ruff, pytest).

pip install scan-build
INSTALL
IMPORT
SIG · SCAN-BUILD
S
scan-build
testingpythonv3.0.0
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

run_command
from clanganalyzer import run_command
from clanganalyzer import Analyze
shell_split
from clanganalyzer import shell_split
shlex
from clanganalyzer import shlex

Basic usage: specify a compilation database and run analysis.

from scan_build import Analyze from scan_build.report import Report # Analyze using compile_commands.json analyzer = Analyze(compilation_database='compile_commands.json') report = analyzer.run() print(report.summary())
scan-build --version
Debug
Known issues
breakingVersion 3.0.0 drops support for Python 3.6-3.9. Update to Python >=3.10.
fix
Upgrade Python to 3.10 or later, and update scan-build to 3.0.0.
affects: <3.0.0
deprecatedThe old CLI entry point 'scan-build' (Perl-based) is not part of this Python package. Only the Python API is provided.
fix
Use the Python API from scan_build module instead of CLI.
affects: >2.0.0
gotchaThe module name is scan_build (underscore), not scan-build (hyphen). Importing with hyphen fails.
fix
Use 'from scan_build import ...'
affects: all
gotchaThe package requires a compilation database (compile_commands.json). It does not work without one.
fix
Generate compile_commands.json using tools like bear or CMake with -DCMAKE_EXPORT_COMPILE_COMMANDS=ON.
affects: all
Upgrade
Version history
3.0.0latest on PyPI · released Feb 25, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
scan-build — pip install scan-build · libregistry