Skip to content

SHSauler/dumbdumbdumb-python

Repository files navigation

dumbdumbdumb

dumbdumbdumb is a single Python file analyzer running multiple quality tools, outputting a single normalized JSON report.

What it does

Given one target file, the analyzer runs:

  • ruff (fast linting + common correctness checks)
  • black --check (format compliance)
  • mypy --strict (strict static type checking)
  • pylint (deeper style/design/code-smell analysis)
  • flake8 (PEP8 and plugin-based lint checks)
  • complexipy (reports cognitive complexity per file/function)

Quick start

1) Build the Docker image

./build.sh

This tags localhost/dumbdumbdumb:latest (the localhost/ prefix keeps Podman from asking which registry to use, which fails when stdout is not a TTY—for example ./dumbdumbdumb file.py > out.json). Re-run it whenever you pull changes or want refreshed analyzer versions inside the image.

2) Run against a file

You only need Docker or Podman and bash. The wrapper script is self-contained: copy dumbdumbdumb anywhere on your PATH (for example ~/bin/) if you like; it always runs localhost/dumbdumbdumb:latest.

chmod +x dumbdumbdumb   # once, if needed
./dumbdumbdumb path/to/file.py

Pretty JSON:

./dumbdumbdumb --pretty path/to/file.py

To work on the in-container Python code, use a normal editable install (python -m pip install -e .) while iterating; production use is still Docker + this script.

JSON report contract

Top-level fields:

  • target: analyzed file path as seen inside the container
  • generated_at: UTC ISO-8601 timestamp
  • summary: aggregate counts and recommended process exit code
  • findings: flat list of all normalized findings from every tool (in run order)
  • tools: per-tool execution summary (no raw stdout/stderr; use the tool directly if you need that)

summary includes:

  • tool_count
  • finding_count (all severities)
  • actionable_finding_count (excludes severity info, e.g. complexity notes)
  • suppressed_finding_count (aggregated across tools)
  • failed_tools (names where execution failed)
  • tools_with_issues (names that reported lint/type issues)
  • exit_code: 0 clean, 1 actionable findings or tools with issues, 2 at least one tool failed to run

Each object in findings includes:

  • tool, severity, message, path
  • Optional: line, column, end_line, end_column, code, symbol (omitted when not applicable)

Each object in tools includes:

  • name, status (ok | issues | error), exit_code, duration_ms
  • finding_count, suppressed_finding_count
  • error (present only when status is error)

Docker image notes

  • Using Docker python-alpine instead of python-slim will result in 1GB bigger image, since it has to install build-base

About

Single Python file analyzer running multiple quality tools, outputting a single normalized JSON report.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors