A SonarQube-like static analysis CLI for Python projects.
Project description
supersonar
supersonar is a lightweight, SonarQube-inspired static analysis CLI for Python projects.
It is designed for local use and CI pipelines via pip install.
Quick start
pip install .
supersonar scan . --format json
The scanner performs real code checks (AST + regex), including:
- dynamic execution (
eval/exec) - broad exception handlers
- hardcoded secret-like assignments
- TODO/FIXME markers
CI usage
pip install supersonar
supersonar scan . \
--format sarif \
--out reports/supersonar.sarif \
--fail-on high \
--max-high 0 \
--max-critical 0 \
--coverage-xml coverage.xml \
--min-coverage 80
Config (supersonar.toml)
[scan]
exclude = [".git", ".venv", "venv", "build", "dist", "__pycache__"]
coverage_xml = "coverage.xml"
[quality_gate]
fail_on = "high"
max_issues = 200
max_high = 0
max_critical = 0
min_coverage = 80.0
[report]
format = "json"
Quality gates
fail_on: fail if any issue exists at/above severitymax_issues: fail if total issues exceed thresholdmax_low,max_medium,max_high,max_critical: per-severity capsmin_coverage: minimum line coverage percentage from Cobertura XML
Generate coverage.xml in Python projects with:
python -m pip install coverage
coverage run -m pytest
coverage xml -o coverage.xml
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file supersonar-0.2.0.tar.gz.
File metadata
- Download URL: supersonar-0.2.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c434ee83216c4521960b972bb883eee6850e20b43c6d3785ac79449c42b3914
|
|
| MD5 |
9a54e082982aa54f063e4fff1810c701
|
|
| BLAKE2b-256 |
be9e4acd617d3aa3a0b8e10064dc09a2534fcf175e5ce8aa479b4e654e2b0075
|
File details
Details for the file supersonar-0.2.0-py3-none-any.whl.
File metadata
- Download URL: supersonar-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffadb2a19817a92b47c7644d95c0f783ab73ffabd378cb7ab129143ecaec9fe0
|
|
| MD5 |
6af758d83b0406b414d42844362650d8
|
|
| BLAKE2b-256 |
e6d1dc590de890c4fec1a8cfb4c7152e021d67c0a0171a7610d31a2cd958608f
|