Simplify and wrap the use of clang-tidy and coccinelle
Project description
Schecker
A Security/Safety Checker for C/C++ based on Clang-Tidy and Coccinelle.
Usage
pip install schecker
#!/usr/bin/python
import sys
import schecker
paths = [ './path/to/your/c/project' ]
excludes = [ './path/to/your/c/project/third-party' ]
scripts = ['schecker/tests/cocci-scripts/']
schecker = schecker.Schecker(paths, excludes=excludes)
schecker.options_coccinelle(script_dirs=scripts)
# now start the actual test, this may take some time
schecker.check_all(sys.stderr)
Dependencies
Schecker depends on clang-tidy and coccinelle, though it is possible to disable
the modules seperatly. E.g. you don't need coccinelle: Schecker(..., modules_disabled=['coccinelle'])
sudo aptitude install clang-tidy coccinelle
Documentation
Coccinelle
Getting Comfy with Coccinelle
- https://lwn.net/Articles/315686/
- https://lwn.net/Articles/380835/
- https://events.static.linuxfound.org/sites/events/files/slides/Introduction%20to%20Coccinelle.pdf
Defect Spotting with Coccinelle
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
schecker-0.1.0.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for schecker-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 018ad5ee3651b8d8d6a4dbc8384bdc8acc573666c7f6544c58e1bebca61cf0bf |
|
MD5 | 10cc835131419a8cb152d78e4ec92230 |
|
BLAKE2b-256 | 598efbc89d945fa0eb59a72aa75e5b7e12410915a9a64c655b6c497a5d4036f4 |