CRYST...ERAGE(1)

πŸ“¦
version 1.22.2 Β· 3 versions
, in arch rolling

πŸŽ€ CRYST...ERAGE(1) β€” crystal-tool-macro_code_coverage πŸŽ€

okay so bestie, welcome to the Crystal Compiler Command Line Reference Guide ✨ this little page is all about crystal-tool-macro_code_coverage, one of the tools tucked inside your Crystal compiler, and honestly? it's giving "niche but iconic" πŸ’…


🌸 NAME 🌸

crystal-tool-macro_code_coverage β€” literally generates a macro code coverage report. that's it. that's the whole vibe. πŸ¦‹


✨ SYNOPSIS ✨

crystal tool macro_code_coverage [options] [programfile]

short, sweet, slays 🫢


πŸ’– DESCRIPTION πŸ’–

So here's the tea β˜• β€” this tool generates a macro code coverage report and outputs it to STDERR. Yes, STDERR, not STDOUT, stay with me here πŸ‘€ and also? any exception that gets raised while it's computing the report goes to STDOUT instead. so the channels are a little swapped, no cap β€” output on STDERR, exceptions on STDOUT. that's just how it is, don't @ me πŸ’€


πŸ‘‘ OPTIONS πŸ‘‘

here's the full lineup, no skips, no cuts, we don't do that here πŸ’œ

  • -D FLAG, --define=FLAG β€” defines a compile-time flag ✨ this is lowkey so useful because it lets you conditionally define types, methods, or commands depending on which flags are available at compile time. the default flags come from the target triple you passed with --target-triple, or from the host's default if you didn't give one at all 🌈
  • -f FORMAT, --format=FORMAT β€” picks the output format. the one and only option: codecov, and yes it's the default πŸ’…
  • -i PATH, --include=PATH β€” includes a path in the output πŸŽ€
  • -e PATH, --exclude=PATH β€” excludes a path in the output. default is lib πŸ‘€
  • --error-trace β€” shows the full error trace, i.e. the whole receipts trail when something goes wrong 😭
  • --prelude β€” specifies the prelude to use. the default one initializes the garbage collector πŸ—‘οΈβœ¨ you can also go --prelude=empty to use no preludes at all β€” genuinely handy for checking code generation for a specific source code file πŸ”₯
  • -s, --stats β€” prints statistics about the different compiler stages for the current build. that means output time and used memory for each compiler process, so you can be nosy about where your resources went πŸ•΅οΈβ€β™€οΈ
  • -p, --progress β€” prints statistics about the progress for the current build πŸ“ˆ
  • -t, --time β€” prints statistics about the execution time ⏱️
  • --no-color β€” disables colored output 🚫🌈 (sad, but sometimes you need it, respect)

ngl bestie, remember the channel situation: the report itself lands on STDERR, and any exception raised while computing it lands on STDOUT. that's not a typo, that's just the lore πŸ’€πŸ’–

and that's the whole page, you ate it up fr fr πŸ‘‘ this was crystal 1.22.2, dated 2026-10-30 β€” mwah, drink some water, and go generate some coverage πŸ“πŸ§šπŸ’œ

πŸ“¦ where this page comes from