OCAMLWC(1)

πŸ’– OCAMLWC(1) β€” the count-your-lines baddie πŸ’–

okay bestie, so this is a General Commands Manual page for ocamlwc, and it lives in section 1 of the manual. That's the whole header situation, we're moving on, it's giving very demure, very mindful. πŸŽ€


✨ NAME ✨

ocamlwc β€” count the lines of code and comments in OCaml sources


🌸 SYNOPSIS 🌸

ocamlwc [options] [files]

πŸ¦‹ DESCRIPTION πŸ¦‹

so ocamlwc is literally a program that counts the number of lines of code and the number of lines of documentation in OCaml sources. no cap, that's the whole gig. 🫢

it assumes its input to be lexically well-formed β€” like, it's not out here doing detective work on your broken files, it just trusts you. πŸ’…

and if you pass it no files at all, then ocamlwc reads from stdin. main character energy, it'll just wait for you to type at it. 😭


okay so the output?? let's break it down because the column situation is real:

  • the first column is the number of source lines of code
  • the second column is the number of lines of documentation
  • the third column is the respective filename

and if ocamlwc acts on more than one file, then it prints a total in the last line. slay, math is mathing. ✨


πŸ‘‘ OPTIONS πŸ‘‘

  • -p β€” print percentage of documentation (in an additional column after the filename). yes bestie, we're doing percentages now, we're quantifying the vibe. πŸ“
  • -c β€” print only the code size, i.e., omit the documentation column. code only, doc who? πŸ™ˆ
  • -e β€” (everything) do not skip headers. and a header is the first comment in a file. so with -e you're saying "keep the header, I want it, I'm obsessed." πŸ’–
  • -a β€” (all) do not skip generated files. and here's the tea: foo.ml is a generated file if one of foo.mll, foo.mly, or foo.ml4 is amongst the given files. and foo.mli is a generated file if foo.mly is amongst the given files. periodt. πŸ‘‘
  • -h β€” print short usage information. the "help me help you" option, iconic, we stan. 🌈
ngl, the -a and -e flags are the "don't skip stuff" flags. by default ocamlwc is out here skipping headers and generated files like it's decluttering, and these two are how you tell it to stop. 🧚

πŸ’œ AUTHOR πŸ’œ

ocamlwc was written by Jean-Christophe Filliatre <Jean-Christophe.Filliatre@lri.fr>.

This manual page was written by Georg Neis <gn@oglaroon.de>.


and that's the whole page bestie, we ate and left no crumbs πŸ’…βœ¨ β€” this came from the General Commands Manual and it's dated January 2, 2007, so yeah, vintage. still slaps tho. πŸŽ€πŸ’–πŸ¦‹