Skip to main content

A SonarQube-like static analysis CLI for multi-language repositories.

Project description

supersonar

supersonar is a lightweight, SonarQube-inspired static analysis CLI for multi-language repositories. It is designed for local use and CI pipelines via pip install (Python 3.10+).

Quick start

pip install .
supersonar scan . --format json

Pipeline install (pip)

Use an isolated environment in CI:

python -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install supersonar
supersonar --version
supersonar scan . --format sarif --out reports/supersonar.sarif

Or install from repository source directly:

python -m pip install "git+https://github.com/mortaccio/supersonar.git@main"

The scanner performs real code checks (AST + regex), including:

  • dynamic execution (eval/exec)
  • broad exception handlers
  • hardcoded secret-like assignments
  • TODO/FIXME markers
  • unresolved merge conflict markers

Python files use AST rules. Other file types use generic cross-language text rules.

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__"]
include_extensions = [".py", ".java", ".js", ".ts", ".go", ".rs", ".cs", ".yaml", ".yml", ".json", ".toml"]
include_filenames = ["Dockerfile", "Jenkinsfile", "Makefile"]
max_file_size_kb = 1024
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"

Use CLI overrides when needed:

supersonar scan . --include-ext .java --include-ext .kt --include-file Dockerfile

Quality gates

  • fail_on: fail if any issue exists at/above severity
  • max_issues: fail if total issues exceed threshold
  • max_low, max_medium, max_high, max_critical: per-severity caps
  • min_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

supersonar-0.3.1.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

supersonar-0.3.1-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file supersonar-0.3.1.tar.gz.

File metadata

  • Download URL: supersonar-0.3.1.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for supersonar-0.3.1.tar.gz
Algorithm Hash digest
SHA256 cfa74c5f860cd206d10edb879cb3bceb314ec8e37dbc9b1e223440afdbd5d9fe
MD5 8c7f7e3790ed93735e3445667c14a402
BLAKE2b-256 703f08f5c6ca30867a2c4d74bc3809279223bdd5c81da4592efdbea33612de48

See more details on using hashes here.

File details

Details for the file supersonar-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: supersonar-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for supersonar-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 17fa2721e4cfa7914a5898551dd4fab4d7de0a2b7b2b84f8e6f049d72d0aa825
MD5 9529bc536db3c038c9aa269e0a5c5126
BLAKE2b-256 33b67896d3d667c3c3271eedf6a4b4b9b133368a16410397a0614b6a8a62a3e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page