Skip to main content

Beginner-friendly codebase doctor: lint, format, type-check, security and tests.

Project description

CodeDoctor - v0.1.0

CodeDoctor is a beginner-friendly Python CLI that scans a repository and summarizes common quality checks (linting, formatting, typing, security, and tests) in one readable report.

It can also generate a TL;DR summary at the top of the report and save results to a .txt report file so you can compare runs over time.


What it checks

Depending on what you have installed, CodeDoctor can run:

  • ruff — linting (and optional auto-fixes)
  • black — formatting (and optional formatting changes)
  • mypy — static type checking
  • bandit — basic security checks
  • pytest — test runner

If a tool is missing, CodeDoctor will report it clearly.


Installation

Option A: Install from PyPI (recommended once published)

pip install codedoctor

Option B: Install from source (for development)

git clone https://github.com/BigPattyOG/CodeDoctor.git
cd CodeDoctor
python -m venv .venv
# Windows:
.venv\Scripts\activate
# macOS/Linux:
source .venv/bin/activate

python -m pip install -U pip
python -m pip install -e .

To include developer tools (recommended for contributors):

python -m pip install -e ".[dev]"

Quick start

From inside any repo you want to scan:

codedoctor scan .

CodeDoctor prints a report to the terminal and also writes a report file under:

  • .codedoctor/report-latest.txt
  • .codedoctor/report-prev.txt (previous run)
  • .codedoctor/report-YYYYMMDD-HHMMSS.txt (timestamped history)

Example output (TL;DR)

CodeDoctor Report TL;DR
----------------------
Overall: WARN
Checks:  6 passed / 1 warned / 0 failed / 7 total

Warnings:
 - pytest (tests)

Commands

Scan a repo

codedoctor scan .

Apply safe auto-fixes (where supported)

codedoctor scan . --fix

This may run tools like:

  • ruff check . --fix
  • black .

Skip running tests

codedoctor scan . --skip-tests

Exit codes (for CI)

CodeDoctor uses simple exit codes so it can be used in CI:

  • 0 — all checks PASS
  • 1 — at least one WARN, and no FAIL
  • 2 — one or more FAIL

Notes (Windows + pytest warnings)

On Windows, pytest may sometimes print messages like:

  • Exception ignored in atexit callback
  • PermissionError: [WinError 5] Access is denied

Even if tests pass, CodeDoctor may classify the result as WARN so the run is not marked as perfectly clean.


Contributing

PRs welcome. A typical workflow:

python -m pip install -e ".[dev]"
pre-commit run --all-files
pytest -q

License

MIT — see LICENSE.

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

codedoctor-0.1.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

codedoctor-0.1.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file codedoctor-0.1.1.tar.gz.

File metadata

  • Download URL: codedoctor-0.1.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for codedoctor-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a795927e6ac23ad804593a03261d6e3a943cf8fb47e12170f54aced2ac90dbae
MD5 46627bebceb2edeb0afa0caa0fbaca49
BLAKE2b-256 a08dc14b00947944dacaca60c041c018cb114e24a438eaabcb95f906a34347ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for codedoctor-0.1.1.tar.gz:

Publisher: release.yml on BigPattyOG/CodeDoctor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file codedoctor-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: codedoctor-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for codedoctor-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d1cfefaab9018ea92f510f76c5bd379f3cb244fab573dc2df4832d9ade94e2c0
MD5 54a6cd71647e3117eaa3eb4ca7b09429
BLAKE2b-256 712e17accd0e54c55e1384455db51fa83f6eb6c2b01eadcccd7338dfef361529

See more details on using hashes here.

Provenance

The following attestation bundles were made for codedoctor-0.1.1-py3-none-any.whl:

Publisher: release.yml on BigPattyOG/CodeDoctor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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