Skip to main content

score.py

Ein winziges, dependency-freies Werkzeug, das jede C-Funktion mit einer einzigen Zahl bewertet. Hoher Score heißt: Diese Funktion lohnt einen prüfenden Blick — als Review-Kandidat und als Refactoring-Hinweis.

score(f) = Verschachtelung × Zeiger-Tiefe × Deref-Kette

Auf zwei sehr unterschiedlichen Codebasen (libXt, libtiff) ranket der Score die Funktionen mit dem höchsten Wartungs-Churn besser als Zeilenzahl oder zyklomatische Komplexität. Es ist ein Triage-Werkzeug, kein Bug-Detektor.

Bei KI-gestützter C-Entwicklung ist c-code-score ein nützliches Hilfsmittel: Das Modell bekommt mit dem Score direktes Feedback zu jeder Funktion und kann so verschachtelten, zeigerlastigen Code vermeiden — es erzeugt von sich aus besser wartbaren Code.

Dateien

  • quickstart.md — in 30 Sekunden loslegen
  • anleitung.md — Metrik, Interpretation, Grenzen
  • artikel.md — der kurze Artikel zur Veröffentlichung
  • score.py — das Werkzeug selbst (eine Datei, kein Dependency)

Kurz

python3 score.py --selftest      # Selbsttest
python3 score.py pfad/zu/datei.c # Funktionen + Score

Metadata

Release files for c-code-score 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for c-code-score 0.1.2
File Size Uploaded
c_code_score-0.1.2.tar.gz 7.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for c-code-score 0.1.2
File Interpreter ABI Platform
c_code_score-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 15.4 kB

Release files / c_code_score-0.1.2.tar.gz

Download URL c_code_score-0.1.2.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2dec866ee7049685132b90d76dd8526d61b4f30ea7aab8cd8c087c3c931a47f1
BLAKE2b-256 checksum
How to use checksums
5f9974bc2c214fdf95239608c29f9aea6495456f8505c5e1a40a261185164faa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / c_code_score-0.1.2-py3-none-any.whl

Download URL c_code_score-0.1.2-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa2ab509a50e6606be2d8d282e86982c9a341cd094eeca64148dcd1062f6e640
BLAKE2b-256 checksum
How to use checksums
28d7fe0186c10f1c2c5b1b18dfbd16bf725f964a393337c94b3655eccaf38151
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page