{"id":22334,"library":"scan-build","title":"scan-build","description":"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).","status":"active","version":"3.0.0","language":"python","source_language":"en","source_url":"https://github.com/rizsotto/scan-build","tags":["static analysis","clang","compilation database","code analyzer"],"install":[{"cmd":"pip install scan-build","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"wrong":"from clanganalyzer import Analyze","symbol":"run_command","correct":"from clanganalyzer import run_command"},{"symbol":"shell_split","correct":"from clanganalyzer import shell_split"},{"symbol":"shlex","correct":"from clanganalyzer import shlex"}],"quickstart":{"code":"from scan_build import Analyze\nfrom scan_build.report import Report\n\n# Analyze using compile_commands.json\nanalyzer = Analyze(compilation_database='compile_commands.json')\nreport = analyzer.run()\nprint(report.summary())","lang":"python","description":"Basic usage: specify a compilation database and run analysis."},"warnings":[{"fix":"Upgrade Python to 3.10 or later, and update scan-build to 3.0.0.","message":"Version 3.0.0 drops support for Python 3.6-3.9. Update to Python >=3.10.","severity":"breaking","affected_versions":"<3.0.0"},{"fix":"Use the Python API from scan_build module instead of CLI.","message":"The old CLI entry point 'scan-build' (Perl-based) is not part of this Python package. Only the Python API is provided.","severity":"deprecated","affected_versions":">2.0.0"},{"fix":"Use 'from scan_build import ...'","message":"The module name is scan_build (underscore), not scan-build (hyphen). Importing with hyphen fails.","severity":"gotcha","affected_versions":"all"},{"fix":"Generate compile_commands.json using tools like bear or CMake with -DCMAKE_EXPORT_COMPILE_COMMANDS=ON.","message":"The package requires a compilation database (compile_commands.json). It does not work without one.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'-3.9':29 '3.0.0':17 '3.10':23 '3.6':28 'analysi':41 'analyz':7,46 'build':3 'clang':10,42 'code':6,45 'compil':13,43 'compile_commands.json':15 'databas':14,44 'drop':25 'hatchl':37 'latest':20 'maintain':33 'modern':35 'packag':31 'pytest':39 'python':22 'requir':21 'ruff':38 'scan':2 'scan-build':1 'static':5,40 'support':26 'tool':8,36 'use':12 'version':16","created_at":"2026-04-27T17:04:37.318794+00:00","updated_at":"2026-04-27T17:04:37.318794+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"3.0.0","cli_name":"scan-build","cli_version":"sh: 1: scan-build: not found","type":"library","homepage":"https://clang-analyzer.llvm.org/","github":"https://github.com/rizsotto/scan-build","docs":null,"changelog":null,"pypi":"https://pypi.org/project/scan-build/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}