RADON(1)

๐Ÿ“ฆ
version 6.0.1 ยท 4 versions
, in ubuntu resolute, ubuntu stonking

๐Ÿ’– radon โ€” the manual page, but make it cute ๐Ÿ’–

okay bestie, welcome to the radon page (that's section 1 of the manual, iykyk) โœจ this is the whole thing, every single flag, no skips, no cap ๐Ÿซถ

โœจ NAME โœจ

radon โ€” Python tool to compute code metrics ๐Ÿ’…


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

okay so radon is a Python tool that computes various code metrics. that's literally the whole vibe. it looks at your code and goes "here's some numbers about it, bestie" ๐Ÿ”ฅ๐Ÿ“Š

๐ŸŽ€ Summary ๐ŸŽ€

radon is a Python tool which computes various code metrics. the supported metrics are, and bestie there are four of them so brace yourself:

  • raw metrics: SLOC, comment lines, blank lines, etc. ๐Ÿ“
  • Cyclomatic Complexity (i.e. McCabe's Complexity) โ€” yes that one, the famous one ๐Ÿ‘‘
  • Halstead metrics (all of them. every last one. she's thorough ๐Ÿ’…)
  • the Maintainability Index (a Visual Studio metric) โ€” fancy fr fr

and the best part?? Radon can be used either from the command line or programmatically through its API. so whether you're a terminal girly or a script girly, she's got you ๐ŸŒˆ

๐ŸŒธ Usage ๐ŸŒธ

radon [-h] [-v] {cc,raw,mi,hal} ...

okay so that's the shape of it. now let's break down every single piece, because nothing gets skipped on my watch ๐Ÿ’–

โญ positional arguments โญ

  • {cc,raw,mi,hal} โ€” pick your fighter, bestie. here's what each one does:
    • cc โ€” Analyze the given Python modules and compute Cyclomatic Complexity (CC). ๐ŸŒ€
    • raw โ€” Analyze the given Python modules and compute raw metrics. ๐Ÿ“
    • mi โ€” Analyze the given Python modules and compute the Maintainability Index. ๐Ÿ’Ž
    • hal โ€” Analyze the given Python modules and compute their Halstead metrics. ๐Ÿงฎ

๐Ÿซถ optional arguments ๐Ÿซถ

  • -h, --help โ€” show this help message and exit. the classic. the iconique. she will never let you down ๐Ÿ’…
  • -v, --version โ€” show program's version number and exit. ๐Ÿ’–

okay so if you wanna go down the rabbit hole on what Cyclomatic Complexity even is, here's the link the manpage gives you:

<https://dzone.com/articles/
what-exactly-is-mccabe-cyclomatic-complexity>

and here's the tl;dr vibe of it, straight from the page:

Cyclomatic Complexity can be seen simply as the number of independent paths that exist between the input of the function and its output

also two very important little notes, bestie, don't skip these ๐Ÿ‘€

  • radon output consists of columns. The first column indicates F M C - or function method class. ๐Ÿ”ค
  • Use --exclude "*/filename.py" to skip a particular file(s)

2012-2017 Michele Lacchia


and that's the whole page, you ate it, periodt ๐ŸŽ€โœจ this was radon section 1, version 2.3.1, written by Michele Lacchia, copyright 2012-2017 โ€” go compute some metrics bestie, the columns are waiting ๐Ÿ’œ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from