Skip to main content

Multi-language code quality scanner — complexity, duplication, security, and smells

Project description

qlint

Multi-language code quality scanner. Walks any codebase and produces JSON, HTML, and Markdown reports covering complexity, duplication, security, and code smells.

Install

pip install -e .

Usage

qlint /path/to/repo                  # JSON + HTML + Markdown; auto-opens HTML
qlint /path/to/repo --format md      # Markdown only
qlint /path/to/repo --format json,md # JSON + Markdown, no HTML, no auto-open
qlint /path/to/repo --no-open
qlint /path/to/repo --json-only      # print JSON to stdout, no files
qlint /path/to/repo -v               # verbose per-file output
qlint                                # interactive: prompts for path

Reports are written to ~/Downloads/qlint-reports/<repo>/ as report.json, report.html, and report.md. HTML auto-opens only when an HTML report is produced.

Options

Flag Description
--format, -f Comma-separated formats: json, html, md (default: all three)
--output, -o Custom JSON output path (implies json)
--html Custom HTML output path (implies html)
--md Custom Markdown output path (implies md)
--json-only Skip files, print JSON to stdout
--no-open Do not auto-open HTML report
--verbose, -v Show per-file progress
--version Show version

Analysis Features

Feature What it detects
Complexity Cyclomatic complexity per function, flags > 10
Duplication Duplicate 6-line blocks across files
Security Hardcoded secrets, dangerous functions (eval, exec, …)
Code Smells Long functions, deep nesting, long parameter lists
Git Risk risk = (complexity × churn) / authors — predicts high-debt files using git history

Languages

Python, JavaScript, TypeScript, Java, Go, Ruby, Rust, C, C++, C#, PHP, Swift, Kotlin, Scala, Shell, HTML, CSS, SQL, YAML, JSON, and more.

JSON Output

{
  "scanId": "...",
  "timestamp": "...",
  "repository": { "path": "...", "totalFiles": 42, "totalLines": 8500, "languages": {} },
  "files": [
    {
      "path": "src/main.py",
      "language": "Python",
      "metrics": { "loc": 120, "code": 95, "comments": 10, "blank": 15, "functions": 8, "classes": 2, "complexity": 4.2 },
      "smells": [],
      "security_issues": [],
      "git_risk": { "commits": 12, "churn": 340, "authors": 2, "risk_score": 25.5 }
    }
  ],
  "qualityScore": 87,
  "grade": "B",
  "gitRisk": {
    "available": true,
    "top_risk_files": []
  }
}

Development

make install   # pip install -e ".[dev]"
make lint      # ruff check
make format    # ruff format
make build     # python3 -m build

Requirements

  • Python 3.11+
  • git in PATH (for git risk analysis; optional)

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

qlint-0.2.1.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

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

qlint-0.2.1-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file qlint-0.2.1.tar.gz.

File metadata

  • Download URL: qlint-0.2.1.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for qlint-0.2.1.tar.gz
Algorithm Hash digest
SHA256 c19147ed35c39344552fb81f1a43df363caa74586f50ddfa26b405c4dd6eeeab
MD5 36d3376653e3fdcb95d417eb1be49b40
BLAKE2b-256 90dc0d98ee1f99dc926a3a98f06b4b27e36bee625b8e6aa4d4fd6228da5bc317

See more details on using hashes here.

File details

Details for the file qlint-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: qlint-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for qlint-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ab8da03d9934d1e89dbdb9d75d99653a103f08285af2863df8bdb9c3716a0ded
MD5 a9eab57c926f1d3b618bc3c63f938d2e
BLAKE2b-256 8debbee2f58c4b9312b7fe4cdb39dcb1eb26960d2a90d5ebd77f46062e1043d6

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