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 . --fixblack .
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 callbackPermissionError: [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
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 codedoctor-0.1.0.tar.gz.
File metadata
- Download URL: codedoctor-0.1.0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57963b38fac1ec3ada58b9aa0a5252530e2bad0600f54f86af9acd46757353e1
|
|
| MD5 |
50639f8e607e76182b6de4370e3fe622
|
|
| BLAKE2b-256 |
54dcc57795fb6117b97350315380c4c6377696f069dcc8374550c9574e219a33
|
Provenance
The following attestation bundles were made for codedoctor-0.1.0.tar.gz:
Publisher:
release.yml on BigPattyOG/CodeDoctor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codedoctor-0.1.0.tar.gz -
Subject digest:
57963b38fac1ec3ada58b9aa0a5252530e2bad0600f54f86af9acd46757353e1 - Sigstore transparency entry: 969405429
- Sigstore integration time:
-
Permalink:
BigPattyOG/CodeDoctor@df311674af8484a3b78df173f07c6d41763d3a4a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/BigPattyOG
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@df311674af8484a3b78df173f07c6d41763d3a4a -
Trigger Event:
push
-
Statement type:
File details
Details for the file codedoctor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: codedoctor-0.1.0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15195cfdf30403a65756aff794fecf39a7f9a5533c3deb4544106b13f76e3419
|
|
| MD5 |
3cca5878b5af68f506f090ca401d65ab
|
|
| BLAKE2b-256 |
d454ef93b483aafdd113bf4b3700b481f5af6cdb6795521e0a29953ff8151bbc
|
Provenance
The following attestation bundles were made for codedoctor-0.1.0-py3-none-any.whl:
Publisher:
release.yml on BigPattyOG/CodeDoctor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codedoctor-0.1.0-py3-none-any.whl -
Subject digest:
15195cfdf30403a65756aff794fecf39a7f9a5533c3deb4544106b13f76e3419 - Sigstore transparency entry: 969405488
- Sigstore integration time:
-
Permalink:
BigPattyOG/CodeDoctor@df311674af8484a3b78df173f07c6d41763d3a4a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/BigPattyOG
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@df311674af8484a3b78df173f07c6d41763d3a4a -
Trigger Event:
push
-
Statement type: